//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_spi(SotoInternal) import SotoCore

extension ChimeSDKVoice {
    // MARK: Enums

    public enum AlexaSkillStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case active = "ACTIVE"
        case inactive = "INACTIVE"
        public var description: String { return self.rawValue }
    }

    public enum CallLegType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case callee = "Callee"
        case caller = "Caller"
        public var description: String { return self.rawValue }
    }

    public enum CallingNameStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case unassigned = "Unassigned"
        case updateFailed = "UpdateFailed"
        case updateInProgress = "UpdateInProgress"
        case updateSucceeded = "UpdateSucceeded"
        public var description: String { return self.rawValue }
    }

    public enum Capability: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case sms = "SMS"
        case voice = "Voice"
        public var description: String { return self.rawValue }
    }

    public enum ContactCenterSystemType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case avayaAuraCallCenterElite = "AVAYA_AURA_CALL_CENTER_ELITE"
        case avayaAuraContactCenter = "AVAYA_AURA_CONTACT_CENTER"
        case ciscoUnifiedContactCenterEnterprise = "CISCO_UNIFIED_CONTACT_CENTER_ENTERPRISE"
        case genesysEngageOnPremises = "GENESYS_ENGAGE_ON_PREMISES"
        public var description: String { return self.rawValue }
    }

    public enum ErrorCode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case accessDenied = "AccessDenied"
        case badRequest = "BadRequest"
        case conflict = "Conflict"
        case forbidden = "Forbidden"
        case gone = "Gone"
        case notFound = "NotFound"
        case phoneNumberAssociationsExist = "PhoneNumberAssociationsExist"
        case preconditionFailed = "PreconditionFailed"
        case resourceLimitExceeded = "ResourceLimitExceeded"
        case serviceFailure = "ServiceFailure"
        case serviceUnavailable = "ServiceUnavailable"
        case throttled = "Throttled"
        case throttling = "Throttling"
        case unauthorized = "Unauthorized"
        case unprocessable = "Unprocessable"
        case voiceConnectorGroupAssociationsExist = "VoiceConnectorGroupAssociationsExist"
        public var description: String { return self.rawValue }
    }

    public enum GeoMatchLevel: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case areaCode = "AreaCode"
        case country = "Country"
        public var description: String { return self.rawValue }
    }

    public enum LanguageCode: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case enUs = "en-US"
        public var description: String { return self.rawValue }
    }

    public enum NotificationTarget: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case eventBridge = "EventBridge"
        case sns = "SNS"
        case sqs = "SQS"
        public var description: String { return self.rawValue }
    }

    public enum NumberSelectionBehavior: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case avoidSticky = "AvoidSticky"
        case preferSticky = "PreferSticky"
        public var description: String { return self.rawValue }
    }

    public enum OrderedPhoneNumberStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case acquired = "Acquired"
        case failed = "Failed"
        case processing = "Processing"
        public var description: String { return self.rawValue }
    }

    public enum OriginationRouteProtocol: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case tcp = "TCP"
        case udp = "UDP"
        public var description: String { return self.rawValue }
    }

    public enum PhoneNumberAssociationName: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case sipRuleId = "SipRuleId"
        case voiceConnectorGroupId = "VoiceConnectorGroupId"
        case voiceConnectorId = "VoiceConnectorId"
        public var description: String { return self.rawValue }
    }

    public enum PhoneNumberOrderStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case cancelRequested = "CancelRequested"
        case cancelled = "Cancelled"
        case changeRequested = "ChangeRequested"
        case exception = "Exception"
        case failed = "Failed"
        case foc = "FOC"
        case partial = "Partial"
        case pendingDocuments = "PendingDocuments"
        case processing = "Processing"
        case submitted = "Submitted"
        case successful = "Successful"
        public var description: String { return self.rawValue }
    }

    public enum PhoneNumberOrderType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case new = "New"
        case porting = "Porting"
        public var description: String { return self.rawValue }
    }

    public enum PhoneNumberProductType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case sipMediaApplicationDialIn = "SipMediaApplicationDialIn"
        case voiceConnector = "VoiceConnector"
        public var description: String { return self.rawValue }
    }

    public enum PhoneNumberStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case acquireFailed = "AcquireFailed"
        case acquireInProgress = "AcquireInProgress"
        case assigned = "Assigned"
        case cancelled = "Cancelled"
        case deleteFailed = "DeleteFailed"
        case deleteInProgress = "DeleteInProgress"
        case portinCancelRequested = "PortinCancelRequested"
        case portinInProgress = "PortinInProgress"
        case releaseFailed = "ReleaseFailed"
        case releaseInProgress = "ReleaseInProgress"
        case unassigned = "Unassigned"
        public var description: String { return self.rawValue }
    }

    public enum PhoneNumberType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case local = "Local"
        case tollFree = "TollFree"
        public var description: String { return self.rawValue }
    }

    public enum ProxySessionStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case closed = "Closed"
        case inProgress = "InProgress"
        case open = "Open"
        public var description: String { return self.rawValue }
    }

    public enum SessionBorderControllerType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case audiocodesMediantSbc = "AUDIOCODES_MEDIANT_SBC"
        case avayaSbce = "AVAYA_SBCE"
        case ciscoUnifiedBorderElement = "CISCO_UNIFIED_BORDER_ELEMENT"
        case oracleAcmePacketSbc = "ORACLE_ACME_PACKET_SBC"
        case ribbonSbc = "RIBBON_SBC"
        public var description: String { return self.rawValue }
    }

    public enum SipRuleTriggerType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case requestUriHostname = "RequestUriHostname"
        case toPhoneNumber = "ToPhoneNumber"
        public var description: String { return self.rawValue }
    }

    public enum VoiceConnectorAwsRegion: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case apNortheast1 = "ap-northeast-1"
        case apNortheast2 = "ap-northeast-2"
        case apSoutheast1 = "ap-southeast-1"
        case apSoutheast2 = "ap-southeast-2"
        case caCentral1 = "ca-central-1"
        case euCentral1 = "eu-central-1"
        case euWest1 = "eu-west-1"
        case euWest2 = "eu-west-2"
        case usEast1 = "us-east-1"
        case usWest2 = "us-west-2"
        public var description: String { return self.rawValue }
    }

    public enum VoiceConnectorIntegrationType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case connectAnalyticsConnector = "CONNECT_ANALYTICS_CONNECTOR"
        case connectCallTransferConnector = "CONNECT_CALL_TRANSFER_CONNECTOR"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AccessDeniedException: AWSErrorShape {
        public let code: ErrorCode?
        public let message: String?

        @inlinable
        public init(code: ErrorCode? = nil, message: String? = nil) {
            self.code = code
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case code = "Code"
            case message = "Message"
        }
    }

    public struct Address: AWSDecodableShape {
        /// The city of an address.
        public let city: String?
        /// The country of an address.
        public let country: String?
        /// The postal code of an address.
        public let postalCode: String?
        /// The zip + 4 or postal code + 4 of an address.
        public let postalCodePlus4: String?
        /// An address suffix location, such as the S. Unit A in  Central Park S. Unit A.
        public let postDirectional: String?
        /// An address prefix location, such as the N in N. Third St.
        public let preDirectional: String?
        /// The state of an address.
        public let state: String?
        /// The address street, such as 8th Avenue.
        public let streetName: String?
        /// The numeric portion of an address.
        public let streetNumber: String?
        /// The address suffix, such as the N in 8th Avenue N.
        public let streetSuffix: String?

        @inlinable
        public init(city: String? = nil, country: String? = nil, postalCode: String? = nil, postalCodePlus4: String? = nil, postDirectional: String? = nil, preDirectional: String? = nil, state: String? = nil, streetName: String? = nil, streetNumber: String? = nil, streetSuffix: String? = nil) {
            self.city = city
            self.country = country
            self.postalCode = postalCode
            self.postalCodePlus4 = postalCodePlus4
            self.postDirectional = postDirectional
            self.preDirectional = preDirectional
            self.state = state
            self.streetName = streetName
            self.streetNumber = streetNumber
            self.streetSuffix = streetSuffix
        }

        private enum CodingKeys: String, CodingKey {
            case city = "city"
            case country = "country"
            case postalCode = "postalCode"
            case postalCodePlus4 = "postalCodePlus4"
            case postDirectional = "postDirectional"
            case preDirectional = "preDirectional"
            case state = "state"
            case streetName = "streetName"
            case streetNumber = "streetNumber"
            case streetSuffix = "streetSuffix"
        }
    }

    public struct AssociatePhoneNumbersWithVoiceConnectorGroupRequest: AWSEncodableShape {
        /// List of phone numbers, in E.164 format.
        public let e164PhoneNumbers: [String]
        /// If true, associates the provided phone numbers with the provided Amazon Chime SDK Voice Connector Group and removes any previously existing associations.  If false, does not associate any phone numbers that have previously existing associations.
        public let forceAssociate: Bool?
        /// The Amazon Chime SDK Voice Connector group ID.
        public let voiceConnectorGroupId: String

        @inlinable
        public init(e164PhoneNumbers: [String], forceAssociate: Bool? = nil, voiceConnectorGroupId: String) {
            self.e164PhoneNumbers = e164PhoneNumbers
            self.forceAssociate = forceAssociate
            self.voiceConnectorGroupId = voiceConnectorGroupId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encode(self.e164PhoneNumbers, forKey: .e164PhoneNumbers)
            try container.encodeIfPresent(self.forceAssociate, forKey: .forceAssociate)
            request.encodePath(self.voiceConnectorGroupId, key: "VoiceConnectorGroupId")
        }

        public func validate(name: String) throws {
            try self.e164PhoneNumbers.forEach {
                try validate($0, name: "e164PhoneNumbers[]", parent: name, pattern: "^\\+?[1-9]\\d{1,14}$")
            }
            try self.validate(self.voiceConnectorGroupId, name: "voiceConnectorGroupId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case e164PhoneNumbers = "E164PhoneNumbers"
            case forceAssociate = "ForceAssociate"
        }
    }

    public struct AssociatePhoneNumbersWithVoiceConnectorGroupResponse: AWSDecodableShape {
        /// If the action fails for one or more of the phone numbers in the request, a list of the phone numbers is returned, along with error codes and error messages.
        public let phoneNumberErrors: [PhoneNumberError]?

        @inlinable
        public init(phoneNumberErrors: [PhoneNumberError]? = nil) {
            self.phoneNumberErrors = phoneNumberErrors
        }

        private enum CodingKeys: String, CodingKey {
            case phoneNumberErrors = "PhoneNumberErrors"
        }
    }

    public struct AssociatePhoneNumbersWithVoiceConnectorRequest: AWSEncodableShape {
        /// List of phone numbers, in E.164 format.
        public let e164PhoneNumbers: [String]
        /// If true, associates the provided phone numbers with the provided Amazon Chime SDK Voice Connector and removes any previously existing associations. If false, does not associate any phone numbers that have previously existing associations.
        public let forceAssociate: Bool?
        /// The Voice Connector ID.
        public let voiceConnectorId: String

        @inlinable
        public init(e164PhoneNumbers: [String], forceAssociate: Bool? = nil, voiceConnectorId: String) {
            self.e164PhoneNumbers = e164PhoneNumbers
            self.forceAssociate = forceAssociate
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encode(self.e164PhoneNumbers, forKey: .e164PhoneNumbers)
            try container.encodeIfPresent(self.forceAssociate, forKey: .forceAssociate)
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.e164PhoneNumbers.forEach {
                try validate($0, name: "e164PhoneNumbers[]", parent: name, pattern: "^\\+?[1-9]\\d{1,14}$")
            }
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case e164PhoneNumbers = "E164PhoneNumbers"
            case forceAssociate = "ForceAssociate"
        }
    }

    public struct AssociatePhoneNumbersWithVoiceConnectorResponse: AWSDecodableShape {
        /// If the action fails for one or more of the phone numbers in the request, a list of the phone numbers is returned, along with error codes and  error messages.
        public let phoneNumberErrors: [PhoneNumberError]?

        @inlinable
        public init(phoneNumberErrors: [PhoneNumberError]? = nil) {
            self.phoneNumberErrors = phoneNumberErrors
        }

        private enum CodingKeys: String, CodingKey {
            case phoneNumberErrors = "PhoneNumberErrors"
        }
    }

    public struct BadRequestException: AWSErrorShape {
        public let code: ErrorCode?
        public let message: String?

        @inlinable
        public init(code: ErrorCode? = nil, message: String? = nil) {
            self.code = code
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case code = "Code"
            case message = "Message"
        }
    }

    public struct BatchDeletePhoneNumberRequest: AWSEncodableShape {
        /// List of phone number IDs.
        public let phoneNumberIds: [String]

        @inlinable
        public init(phoneNumberIds: [String]) {
            self.phoneNumberIds = phoneNumberIds
        }

        public func validate(name: String) throws {
            try self.validate(self.phoneNumberIds, name: "phoneNumberIds", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case phoneNumberIds = "PhoneNumberIds"
        }
    }

    public struct BatchDeletePhoneNumberResponse: AWSDecodableShape {
        /// If the action fails for one or more of the phone numbers in the request, a list of the phone numbers is returned, along with error codes and error messages.
        public let phoneNumberErrors: [PhoneNumberError]?

        @inlinable
        public init(phoneNumberErrors: [PhoneNumberError]? = nil) {
            self.phoneNumberErrors = phoneNumberErrors
        }

        private enum CodingKeys: String, CodingKey {
            case phoneNumberErrors = "PhoneNumberErrors"
        }
    }

    public struct BatchUpdatePhoneNumberRequest: AWSEncodableShape {
        /// Lists the phone numbers in the update request.
        public let updatePhoneNumberRequestItems: [UpdatePhoneNumberRequestItem]

        @inlinable
        public init(updatePhoneNumberRequestItems: [UpdatePhoneNumberRequestItem]) {
            self.updatePhoneNumberRequestItems = updatePhoneNumberRequestItems
        }

        public func validate(name: String) throws {
            try self.updatePhoneNumberRequestItems.forEach {
                try $0.validate(name: "\(name).updatePhoneNumberRequestItems[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case updatePhoneNumberRequestItems = "UpdatePhoneNumberRequestItems"
        }
    }

    public struct BatchUpdatePhoneNumberResponse: AWSDecodableShape {
        /// A list of failed phone numbers and their error messages.
        public let phoneNumberErrors: [PhoneNumberError]?

        @inlinable
        public init(phoneNumberErrors: [PhoneNumberError]? = nil) {
            self.phoneNumberErrors = phoneNumberErrors
        }

        private enum CodingKeys: String, CodingKey {
            case phoneNumberErrors = "PhoneNumberErrors"
        }
    }

    public struct CallDetails: AWSDecodableShape {
        /// Identifies a person as the caller or the callee.
        public let isCaller: Bool?
        /// The transaction ID of a Voice Connector call.
        public let transactionId: String?
        /// The Voice Connector ID.
        public let voiceConnectorId: String?

        @inlinable
        public init(isCaller: Bool? = nil, transactionId: String? = nil, voiceConnectorId: String? = nil) {
            self.isCaller = isCaller
            self.transactionId = transactionId
            self.voiceConnectorId = voiceConnectorId
        }

        private enum CodingKeys: String, CodingKey {
            case isCaller = "IsCaller"
            case transactionId = "TransactionId"
            case voiceConnectorId = "VoiceConnectorId"
        }
    }

    public struct CandidateAddress: AWSDecodableShape {
        /// The city of the candidate address.
        public let city: String?
        /// The country of the candidate address.
        public let country: String?
        /// The postal code of the candidate address.
        public let postalCode: String?
        /// The zip + 4 or postal code +4 of the candidate address.
        public let postalCodePlus4: String?
        /// The state of the candidate address.
        public let state: String?
        /// The street information of the candidate address.
        public let streetInfo: String?
        /// The numeric portion of the candidate address.
        public let streetNumber: String?

        @inlinable
        public init(city: String? = nil, country: String? = nil, postalCode: String? = nil, postalCodePlus4: String? = nil, state: String? = nil, streetInfo: String? = nil, streetNumber: String? = nil) {
            self.city = city
            self.country = country
            self.postalCode = postalCode
            self.postalCodePlus4 = postalCodePlus4
            self.state = state
            self.streetInfo = streetInfo
            self.streetNumber = streetNumber
        }

        private enum CodingKeys: String, CodingKey {
            case city = "city"
            case country = "country"
            case postalCode = "postalCode"
            case postalCodePlus4 = "postalCodePlus4"
            case state = "state"
            case streetInfo = "streetInfo"
            case streetNumber = "streetNumber"
        }
    }

    public struct ConflictException: AWSErrorShape {
        public let code: ErrorCode?
        public let message: String?

        @inlinable
        public init(code: ErrorCode? = nil, message: String? = nil) {
            self.code = code
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case code = "Code"
            case message = "Message"
        }
    }

    public struct CreatePhoneNumberOrderRequest: AWSEncodableShape {
        /// List of phone numbers, in E.164 format.
        public let e164PhoneNumbers: [String]
        /// Specifies the name assigned to one or more phone numbers.
        public let name: String?
        /// The phone number product type.
        public let productType: PhoneNumberProductType

        @inlinable
        public init(e164PhoneNumbers: [String], name: String? = nil, productType: PhoneNumberProductType) {
            self.e164PhoneNumbers = e164PhoneNumbers
            self.name = name
            self.productType = productType
        }

        public func validate(name: String) throws {
            try self.e164PhoneNumbers.forEach {
                try validate($0, name: "e164PhoneNumbers[]", parent: name, pattern: "^\\+?[1-9]\\d{1,14}$")
            }
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, pattern: "^$|^[a-zA-Z0-9\\,\\.\\_\\-]+(\\s+[a-zA-Z0-9\\,\\.\\_\\-]+)*$")
        }

        private enum CodingKeys: String, CodingKey {
            case e164PhoneNumbers = "E164PhoneNumbers"
            case name = "Name"
            case productType = "ProductType"
        }
    }

    public struct CreatePhoneNumberOrderResponse: AWSDecodableShape {
        /// The phone number order details.
        public let phoneNumberOrder: PhoneNumberOrder?

        @inlinable
        public init(phoneNumberOrder: PhoneNumberOrder? = nil) {
            self.phoneNumberOrder = phoneNumberOrder
        }

        private enum CodingKeys: String, CodingKey {
            case phoneNumberOrder = "PhoneNumberOrder"
        }
    }

    public struct CreateProxySessionRequest: AWSEncodableShape {
        /// The proxy session's capabilities.
        public let capabilities: [Capability]
        /// The number of minutes allowed for the proxy session.
        public let expiryMinutes: Int?
        /// The preference for matching the country or area code of the proxy phone number with that of the first participant.
        public let geoMatchLevel: GeoMatchLevel?
        /// The country and area code for the proxy phone number.
        public let geoMatchParams: GeoMatchParams?
        /// The name of the proxy session.
        public let name: String?
        /// The preference for proxy phone number reuse, or stickiness, between the same  participants across sessions.
        public let numberSelectionBehavior: NumberSelectionBehavior?
        /// The participant phone numbers.
        public let participantPhoneNumbers: [String]
        /// The Voice Connector ID.
        public let voiceConnectorId: String

        @inlinable
        public init(capabilities: [Capability], expiryMinutes: Int? = nil, geoMatchLevel: GeoMatchLevel? = nil, geoMatchParams: GeoMatchParams? = nil, name: String? = nil, numberSelectionBehavior: NumberSelectionBehavior? = nil, participantPhoneNumbers: [String], voiceConnectorId: String) {
            self.capabilities = capabilities
            self.expiryMinutes = expiryMinutes
            self.geoMatchLevel = geoMatchLevel
            self.geoMatchParams = geoMatchParams
            self.name = name
            self.numberSelectionBehavior = numberSelectionBehavior
            self.participantPhoneNumbers = participantPhoneNumbers
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encode(self.capabilities, forKey: .capabilities)
            try container.encodeIfPresent(self.expiryMinutes, forKey: .expiryMinutes)
            try container.encodeIfPresent(self.geoMatchLevel, forKey: .geoMatchLevel)
            try container.encodeIfPresent(self.geoMatchParams, forKey: .geoMatchParams)
            try container.encodeIfPresent(self.name, forKey: .name)
            try container.encodeIfPresent(self.numberSelectionBehavior, forKey: .numberSelectionBehavior)
            try container.encode(self.participantPhoneNumbers, forKey: .participantPhoneNumbers)
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.validate(self.expiryMinutes, name: "expiryMinutes", parent: name, min: 1)
            try self.geoMatchParams?.validate(name: "\(name).geoMatchParams")
            try self.validate(self.name, name: "name", parent: name, pattern: "^$|^[a-zA-Z0-9 ]{0,30}$")
            try self.participantPhoneNumbers.forEach {
                try validate($0, name: "participantPhoneNumbers[]", parent: name, pattern: "^\\+?[1-9]\\d{1,14}$")
            }
            try self.validate(self.participantPhoneNumbers, name: "participantPhoneNumbers", parent: name, max: 2)
            try self.validate(self.participantPhoneNumbers, name: "participantPhoneNumbers", parent: name, min: 2)
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, max: 128)
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, min: 1)
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case capabilities = "Capabilities"
            case expiryMinutes = "ExpiryMinutes"
            case geoMatchLevel = "GeoMatchLevel"
            case geoMatchParams = "GeoMatchParams"
            case name = "Name"
            case numberSelectionBehavior = "NumberSelectionBehavior"
            case participantPhoneNumbers = "ParticipantPhoneNumbers"
        }
    }

    public struct CreateProxySessionResponse: AWSDecodableShape {
        /// The proxy session details.
        public let proxySession: ProxySession?

        @inlinable
        public init(proxySession: ProxySession? = nil) {
            self.proxySession = proxySession
        }

        private enum CodingKeys: String, CodingKey {
            case proxySession = "ProxySession"
        }
    }

    public struct CreateSipMediaApplicationCallRequest: AWSEncodableShape {
        /// Context passed to a CreateSipMediaApplication API call. For example, you could pass key-value pairs such as: "FirstName": "John", "LastName": "Doe"
        public let argumentsMap: [String: String]?
        /// The phone number that a user calls from. This is a phone number in your  Amazon Chime SDK phone number inventory.
        public let fromPhoneNumber: String
        /// The SIP headers added to an outbound call leg.
        public let sipHeaders: [String: String]?
        /// The ID of the SIP media application.
        public let sipMediaApplicationId: String
        /// The phone number that the service should call.
        public let toPhoneNumber: String

        @inlinable
        public init(argumentsMap: [String: String]? = nil, fromPhoneNumber: String, sipHeaders: [String: String]? = nil, sipMediaApplicationId: String, toPhoneNumber: String) {
            self.argumentsMap = argumentsMap
            self.fromPhoneNumber = fromPhoneNumber
            self.sipHeaders = sipHeaders
            self.sipMediaApplicationId = sipMediaApplicationId
            self.toPhoneNumber = toPhoneNumber
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.argumentsMap, forKey: .argumentsMap)
            try container.encode(self.fromPhoneNumber, forKey: .fromPhoneNumber)
            try container.encodeIfPresent(self.sipHeaders, forKey: .sipHeaders)
            request.encodePath(self.sipMediaApplicationId, key: "SipMediaApplicationId")
            try container.encode(self.toPhoneNumber, forKey: .toPhoneNumber)
        }

        public func validate(name: String) throws {
            try self.validate(self.argumentsMap, name: "argumentsMap", parent: name, max: 20)
            try self.validate(self.fromPhoneNumber, name: "fromPhoneNumber", parent: name, pattern: "^\\+?[1-9]\\d{1,14}$")
            try self.validate(self.sipHeaders, name: "sipHeaders", parent: name, max: 20)
            try self.validate(self.sipMediaApplicationId, name: "sipMediaApplicationId", parent: name, pattern: "\\S")
            try self.validate(self.toPhoneNumber, name: "toPhoneNumber", parent: name, pattern: "^\\+?[1-9]\\d{1,14}$")
        }

        private enum CodingKeys: String, CodingKey {
            case argumentsMap = "ArgumentsMap"
            case fromPhoneNumber = "FromPhoneNumber"
            case sipHeaders = "SipHeaders"
            case toPhoneNumber = "ToPhoneNumber"
        }
    }

    public struct CreateSipMediaApplicationCallResponse: AWSDecodableShape {
        /// The actual call.
        public let sipMediaApplicationCall: SipMediaApplicationCall?

        @inlinable
        public init(sipMediaApplicationCall: SipMediaApplicationCall? = nil) {
            self.sipMediaApplicationCall = sipMediaApplicationCall
        }

        private enum CodingKeys: String, CodingKey {
            case sipMediaApplicationCall = "SipMediaApplicationCall"
        }
    }

    public struct CreateSipMediaApplicationRequest: AWSEncodableShape {
        /// The AWS Region assigned to the SIP media application.
        public let awsRegion: String
        /// List of endpoints (Lambda ARNs) specified for the SIP media application.
        public let endpoints: [SipMediaApplicationEndpoint]
        /// The SIP media application's name.
        public let name: String
        /// The tags assigned to the SIP media application.
        public let tags: [Tag]?

        @inlinable
        public init(awsRegion: String, endpoints: [SipMediaApplicationEndpoint], name: String, tags: [Tag]? = nil) {
            self.awsRegion = awsRegion
            self.endpoints = endpoints
            self.name = name
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.endpoints.forEach {
                try $0.validate(name: "\(name).endpoints[]")
            }
            try self.validate(self.endpoints, name: "endpoints", parent: name, max: 1)
            try self.validate(self.endpoints, name: "endpoints", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9 _.-]+$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case awsRegion = "AwsRegion"
            case endpoints = "Endpoints"
            case name = "Name"
            case tags = "Tags"
        }
    }

    public struct CreateSipMediaApplicationResponse: AWSDecodableShape {
        /// The SIP media application details.
        public let sipMediaApplication: SipMediaApplication?

        @inlinable
        public init(sipMediaApplication: SipMediaApplication? = nil) {
            self.sipMediaApplication = sipMediaApplication
        }

        private enum CodingKeys: String, CodingKey {
            case sipMediaApplication = "SipMediaApplication"
        }
    }

    public struct CreateSipRuleRequest: AWSEncodableShape {
        /// Disables or enables a SIP rule. You must disable SIP rules  before you can delete them.
        public let disabled: Bool?
        /// The name of the SIP rule.
        public let name: String
        /// List of SIP media applications, with priority and AWS Region. Only one SIP  application per AWS Region can be used.
        public let targetApplications: [SipRuleTargetApplication]?
        /// The type of trigger assigned to the SIP rule in TriggerValue,  currently RequestUriHostname or ToPhoneNumber.
        public let triggerType: SipRuleTriggerType
        /// If TriggerType is RequestUriHostname, the  value can be the outbound host name of a Voice Connector. If  TriggerType is ToPhoneNumber, the value can  be a customer-owned phone number in the E164 format. The  SipMediaApplication specified in the SipRule is triggered  if the request URI in an incoming SIP request matches the  RequestUriHostname, or if the To header in the  incoming SIP request matches the ToPhoneNumber value.
        public let triggerValue: String

        @inlinable
        public init(disabled: Bool? = nil, name: String, targetApplications: [SipRuleTargetApplication]? = nil, triggerType: SipRuleTriggerType, triggerValue: String) {
            self.disabled = disabled
            self.name = name
            self.targetApplications = targetApplications
            self.triggerType = triggerType
            self.triggerValue = triggerValue
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9 _.-]+$")
            try self.targetApplications?.forEach {
                try $0.validate(name: "\(name).targetApplications[]")
            }
            try self.validate(self.targetApplications, name: "targetApplications", parent: name, max: 25)
            try self.validate(self.targetApplications, name: "targetApplications", parent: name, min: 1)
            try self.validate(self.triggerValue, name: "triggerValue", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case disabled = "Disabled"
            case name = "Name"
            case targetApplications = "TargetApplications"
            case triggerType = "TriggerType"
            case triggerValue = "TriggerValue"
        }
    }

    public struct CreateSipRuleResponse: AWSDecodableShape {
        /// The SIP rule information, including the rule ID, triggers, and target applications.
        public let sipRule: SipRule?

        @inlinable
        public init(sipRule: SipRule? = nil) {
            self.sipRule = sipRule
        }

        private enum CodingKeys: String, CodingKey {
            case sipRule = "SipRule"
        }
    }

    public struct CreateVoiceConnectorGroupRequest: AWSEncodableShape {
        /// The name of the Voice Connector group.
        public let name: String
        /// Lists the Voice Connectors that inbound calls are routed to.
        public let voiceConnectorItems: [VoiceConnectorItem]?

        @inlinable
        public init(name: String, voiceConnectorItems: [VoiceConnectorItem]? = nil) {
            self.name = name
            self.voiceConnectorItems = voiceConnectorItems
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9 _.-]+$")
            try self.voiceConnectorItems?.forEach {
                try $0.validate(name: "\(name).voiceConnectorItems[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case voiceConnectorItems = "VoiceConnectorItems"
        }
    }

    public struct CreateVoiceConnectorGroupResponse: AWSDecodableShape {
        /// The details of the Voice Connector group.
        public let voiceConnectorGroup: VoiceConnectorGroup?

        @inlinable
        public init(voiceConnectorGroup: VoiceConnectorGroup? = nil) {
            self.voiceConnectorGroup = voiceConnectorGroup
        }

        private enum CodingKeys: String, CodingKey {
            case voiceConnectorGroup = "VoiceConnectorGroup"
        }
    }

    public struct CreateVoiceConnectorRequest: AWSEncodableShape {
        /// The AWS Region in which the Amazon Chime SDK Voice Connector is created. Default value:  us-east-1 .
        public let awsRegion: VoiceConnectorAwsRegion?
        /// The connectors for use with Amazon Connect. The following options are available:    CONNECT_CALL_TRANSFER_CONNECTOR - Enables enterprises to integrate Amazon Connect with other voice systems to directly transfer voice calls and metadata without using the public telephone network. They can use Amazon Connect telephony and Interactive Voice Response (IVR) with their existing voice systems to modernize the IVR experience of their existing contact center and their enterprise and branch voice systems. Additionally, enterprises migrating their contact center to Amazon Connect can start with Connect telephony and IVR for immediate modernization ahead of agent migration.    CONNECT_ANALYTICS_CONNECTOR - Enables enterprises to integrate Amazon Connect with other voice systems for real-time and post-call analytics. They can use Amazon Connect Contact Lens with their existing voice systems to provides call recordings, conversational analytics (including contact transcript, sensitive data redaction, content categorization, theme detection, sentiment analysis, real-time alerts, and post-contact summary), and agent performance evaluations (including evaluation forms, automated evaluation, supervisor review) with a rich user experience to display, search and filter customer interactions, and programmatic access to data streams and the data lake. Additionally, enterprises migrating their contact center to Amazon Connect can start with Contact Lens analytics and performance insights ahead of agent migration.
        public let integrationType: VoiceConnectorIntegrationType?
        /// The name of the Voice Connector.
        public let name: String
        /// Enables or disables encryption for the Voice Connector.
        public let requireEncryption: Bool
        /// The tags assigned to the Voice Connector.
        public let tags: [Tag]?

        @inlinable
        public init(awsRegion: VoiceConnectorAwsRegion? = nil, integrationType: VoiceConnectorIntegrationType? = nil, name: String, requireEncryption: Bool, tags: [Tag]? = nil) {
            self.awsRegion = awsRegion
            self.integrationType = integrationType
            self.name = name
            self.requireEncryption = requireEncryption
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9 _.-]+$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case awsRegion = "AwsRegion"
            case integrationType = "IntegrationType"
            case name = "Name"
            case requireEncryption = "RequireEncryption"
            case tags = "Tags"
        }
    }

    public struct CreateVoiceConnectorResponse: AWSDecodableShape {
        /// The details of the Voice Connector.
        public let voiceConnector: VoiceConnector?

        @inlinable
        public init(voiceConnector: VoiceConnector? = nil) {
            self.voiceConnector = voiceConnector
        }

        private enum CodingKeys: String, CodingKey {
            case voiceConnector = "VoiceConnector"
        }
    }

    public struct CreateVoiceProfileDomainRequest: AWSEncodableShape {
        /// The unique identifier for the client request. Use a different token for different domain creation requests.
        public let clientRequestToken: String?
        /// A description of the voice profile domain.
        public let description: String?
        /// The name of the voice profile domain.
        public let name: String
        /// The server-side encryption configuration for the request.
        public let serverSideEncryptionConfiguration: ServerSideEncryptionConfiguration
        /// The tags assigned to the domain.
        public let tags: [Tag]?

        @inlinable
        public init(clientRequestToken: String? = nil, description: String? = nil, name: String, serverSideEncryptionConfiguration: ServerSideEncryptionConfiguration, tags: [Tag]? = nil) {
            self.clientRequestToken = clientRequestToken
            self.description = description
            self.name = name
            self.serverSideEncryptionConfiguration = serverSideEncryptionConfiguration
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[-_a-zA-Z0-9]*${2,64}$")
            try self.validate(self.description, name: "description", parent: name, max: 1024)
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9 _.-]+$")
            try self.serverSideEncryptionConfiguration.validate(name: "\(name).serverSideEncryptionConfiguration")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken = "ClientRequestToken"
            case description = "Description"
            case name = "Name"
            case serverSideEncryptionConfiguration = "ServerSideEncryptionConfiguration"
            case tags = "Tags"
        }
    }

    public struct CreateVoiceProfileDomainResponse: AWSDecodableShape {
        /// The requested voice profile domain.
        public let voiceProfileDomain: VoiceProfileDomain?

        @inlinable
        public init(voiceProfileDomain: VoiceProfileDomain? = nil) {
            self.voiceProfileDomain = voiceProfileDomain
        }

        private enum CodingKeys: String, CodingKey {
            case voiceProfileDomain = "VoiceProfileDomain"
        }
    }

    public struct CreateVoiceProfileRequest: AWSEncodableShape {
        /// The ID of the speaker search task.
        public let speakerSearchTaskId: String

        @inlinable
        public init(speakerSearchTaskId: String) {
            self.speakerSearchTaskId = speakerSearchTaskId
        }

        public func validate(name: String) throws {
            try self.validate(self.speakerSearchTaskId, name: "speakerSearchTaskId", parent: name, max: 256)
            try self.validate(self.speakerSearchTaskId, name: "speakerSearchTaskId", parent: name, min: 1)
            try self.validate(self.speakerSearchTaskId, name: "speakerSearchTaskId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case speakerSearchTaskId = "SpeakerSearchTaskId"
        }
    }

    public struct CreateVoiceProfileResponse: AWSDecodableShape {
        /// The requested voice profile.
        public let voiceProfile: VoiceProfile?

        @inlinable
        public init(voiceProfile: VoiceProfile? = nil) {
            self.voiceProfile = voiceProfile
        }

        private enum CodingKeys: String, CodingKey {
            case voiceProfile = "VoiceProfile"
        }
    }

    public struct Credential: AWSEncodableShape {
        /// The RFC2617 compliant password associated with the SIP credentials, in US-ASCII format.
        public let password: String?
        /// The RFC2617 compliant user name associated with the SIP credentials, in  US-ASCII format.
        public let username: String?

        @inlinable
        public init(password: String? = nil, username: String? = nil) {
            self.password = password
            self.username = username
        }

        private enum CodingKeys: String, CodingKey {
            case password = "Password"
            case username = "Username"
        }
    }

    public struct DNISEmergencyCallingConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The country from which emergency calls are allowed, in ISO 3166-1 alpha-2 format.
        public let callingCountry: String
        /// The DNIS phone number that you route emergency calls to, in E.164 format.
        public let emergencyPhoneNumber: String
        /// The DNIS phone number for routing test emergency calls to, in E.164 format.
        public let testPhoneNumber: String?

        @inlinable
        public init(callingCountry: String, emergencyPhoneNumber: String, testPhoneNumber: String? = nil) {
            self.callingCountry = callingCountry
            self.emergencyPhoneNumber = emergencyPhoneNumber
            self.testPhoneNumber = testPhoneNumber
        }

        public func validate(name: String) throws {
            try self.validate(self.callingCountry, name: "callingCountry", parent: name, pattern: "^[A-Z]{2}$")
            try self.validate(self.emergencyPhoneNumber, name: "emergencyPhoneNumber", parent: name, pattern: "^\\+?[1-9]\\d{1,14}$")
            try self.validate(self.testPhoneNumber, name: "testPhoneNumber", parent: name, pattern: "^\\+?[1-9]\\d{1,14}$")
        }

        private enum CodingKeys: String, CodingKey {
            case callingCountry = "CallingCountry"
            case emergencyPhoneNumber = "EmergencyPhoneNumber"
            case testPhoneNumber = "TestPhoneNumber"
        }
    }

    public struct DeletePhoneNumberRequest: AWSEncodableShape {
        /// The phone number ID.
        public let phoneNumberId: String

        @inlinable
        public init(phoneNumberId: String) {
            self.phoneNumberId = phoneNumberId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.phoneNumberId, key: "PhoneNumberId")
        }

        public func validate(name: String) throws {
            try self.validate(self.phoneNumberId, name: "phoneNumberId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteProxySessionRequest: AWSEncodableShape {
        /// The proxy session ID.
        public let proxySessionId: String
        /// The Voice Connector ID.
        public let voiceConnectorId: String

        @inlinable
        public init(proxySessionId: String, voiceConnectorId: String) {
            self.proxySessionId = proxySessionId
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.proxySessionId, key: "ProxySessionId")
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.validate(self.proxySessionId, name: "proxySessionId", parent: name, max: 128)
            try self.validate(self.proxySessionId, name: "proxySessionId", parent: name, min: 1)
            try self.validate(self.proxySessionId, name: "proxySessionId", parent: name, pattern: "\\S")
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, max: 128)
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, min: 1)
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteSipMediaApplicationRequest: AWSEncodableShape {
        /// The SIP media application ID.
        public let sipMediaApplicationId: String

        @inlinable
        public init(sipMediaApplicationId: String) {
            self.sipMediaApplicationId = sipMediaApplicationId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.sipMediaApplicationId, key: "SipMediaApplicationId")
        }

        public func validate(name: String) throws {
            try self.validate(self.sipMediaApplicationId, name: "sipMediaApplicationId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteSipRuleRequest: AWSEncodableShape {
        /// The SIP rule ID.
        public let sipRuleId: String

        @inlinable
        public init(sipRuleId: String) {
            self.sipRuleId = sipRuleId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.sipRuleId, key: "SipRuleId")
        }

        public func validate(name: String) throws {
            try self.validate(self.sipRuleId, name: "sipRuleId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteVoiceConnectorEmergencyCallingConfigurationRequest: AWSEncodableShape {
        /// The Voice Connector ID.
        public let voiceConnectorId: String

        @inlinable
        public init(voiceConnectorId: String) {
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteVoiceConnectorExternalSystemsConfigurationRequest: AWSEncodableShape {
        /// The ID of the Voice Connector for which to delete the external system configuration.
        public let voiceConnectorId: String

        @inlinable
        public init(voiceConnectorId: String) {
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteVoiceConnectorGroupRequest: AWSEncodableShape {
        /// The Voice Connector Group ID.
        public let voiceConnectorGroupId: String

        @inlinable
        public init(voiceConnectorGroupId: String) {
            self.voiceConnectorGroupId = voiceConnectorGroupId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.voiceConnectorGroupId, key: "VoiceConnectorGroupId")
        }

        public func validate(name: String) throws {
            try self.validate(self.voiceConnectorGroupId, name: "voiceConnectorGroupId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteVoiceConnectorOriginationRequest: AWSEncodableShape {
        /// The Voice Connector ID.
        public let voiceConnectorId: String

        @inlinable
        public init(voiceConnectorId: String) {
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteVoiceConnectorProxyRequest: AWSEncodableShape {
        /// The Voice Connector ID.
        public let voiceConnectorId: String

        @inlinable
        public init(voiceConnectorId: String) {
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, max: 128)
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, min: 1)
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteVoiceConnectorRequest: AWSEncodableShape {
        /// The Voice Connector ID.
        public let voiceConnectorId: String

        @inlinable
        public init(voiceConnectorId: String) {
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteVoiceConnectorStreamingConfigurationRequest: AWSEncodableShape {
        /// The Voice Connector ID.
        public let voiceConnectorId: String

        @inlinable
        public init(voiceConnectorId: String) {
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteVoiceConnectorTerminationCredentialsRequest: AWSEncodableShape {
        /// The RFC2617 compliant username associated with the SIP credentials,  in US-ASCII format.
        public let usernames: [String]
        /// The Voice Connector ID.
        public let voiceConnectorId: String

        @inlinable
        public init(usernames: [String], voiceConnectorId: String) {
            self.usernames = usernames
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encode(self.usernames, forKey: .usernames)
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case usernames = "Usernames"
        }
    }

    public struct DeleteVoiceConnectorTerminationRequest: AWSEncodableShape {
        /// The Voice Connector ID.
        public let voiceConnectorId: String

        @inlinable
        public init(voiceConnectorId: String) {
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteVoiceProfileDomainRequest: AWSEncodableShape {
        /// The voice profile domain ID.
        public let voiceProfileDomainId: String

        @inlinable
        public init(voiceProfileDomainId: String) {
            self.voiceProfileDomainId = voiceProfileDomainId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.voiceProfileDomainId, key: "VoiceProfileDomainId")
        }

        public func validate(name: String) throws {
            try self.validate(self.voiceProfileDomainId, name: "voiceProfileDomainId", parent: name, max: 256)
            try self.validate(self.voiceProfileDomainId, name: "voiceProfileDomainId", parent: name, min: 1)
            try self.validate(self.voiceProfileDomainId, name: "voiceProfileDomainId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteVoiceProfileRequest: AWSEncodableShape {
        /// The voice profile ID.
        public let voiceProfileId: String

        @inlinable
        public init(voiceProfileId: String) {
            self.voiceProfileId = voiceProfileId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.voiceProfileId, key: "VoiceProfileId")
        }

        public func validate(name: String) throws {
            try self.validate(self.voiceProfileId, name: "voiceProfileId", parent: name, max: 256)
            try self.validate(self.voiceProfileId, name: "voiceProfileId", parent: name, min: 1)
            try self.validate(self.voiceProfileId, name: "voiceProfileId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DisassociatePhoneNumbersFromVoiceConnectorGroupRequest: AWSEncodableShape {
        /// The list of phone numbers, in E.164 format.
        public let e164PhoneNumbers: [String]
        /// The Voice Connector group ID.
        public let voiceConnectorGroupId: String

        @inlinable
        public init(e164PhoneNumbers: [String], voiceConnectorGroupId: String) {
            self.e164PhoneNumbers = e164PhoneNumbers
            self.voiceConnectorGroupId = voiceConnectorGroupId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encode(self.e164PhoneNumbers, forKey: .e164PhoneNumbers)
            request.encodePath(self.voiceConnectorGroupId, key: "VoiceConnectorGroupId")
        }

        public func validate(name: String) throws {
            try self.e164PhoneNumbers.forEach {
                try validate($0, name: "e164PhoneNumbers[]", parent: name, pattern: "^\\+?[1-9]\\d{1,14}$")
            }
            try self.validate(self.voiceConnectorGroupId, name: "voiceConnectorGroupId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case e164PhoneNumbers = "E164PhoneNumbers"
        }
    }

    public struct DisassociatePhoneNumbersFromVoiceConnectorGroupResponse: AWSDecodableShape {
        /// If the action fails for one or more of the phone numbers in the request,  a list of the phone numbers is returned, along with error codes and error messages.
        public let phoneNumberErrors: [PhoneNumberError]?

        @inlinable
        public init(phoneNumberErrors: [PhoneNumberError]? = nil) {
            self.phoneNumberErrors = phoneNumberErrors
        }

        private enum CodingKeys: String, CodingKey {
            case phoneNumberErrors = "PhoneNumberErrors"
        }
    }

    public struct DisassociatePhoneNumbersFromVoiceConnectorRequest: AWSEncodableShape {
        /// List of phone numbers, in E.164 format.
        public let e164PhoneNumbers: [String]
        /// The Voice Connector ID.
        public let voiceConnectorId: String

        @inlinable
        public init(e164PhoneNumbers: [String], voiceConnectorId: String) {
            self.e164PhoneNumbers = e164PhoneNumbers
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encode(self.e164PhoneNumbers, forKey: .e164PhoneNumbers)
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.e164PhoneNumbers.forEach {
                try validate($0, name: "e164PhoneNumbers[]", parent: name, pattern: "^\\+?[1-9]\\d{1,14}$")
            }
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case e164PhoneNumbers = "E164PhoneNumbers"
        }
    }

    public struct DisassociatePhoneNumbersFromVoiceConnectorResponse: AWSDecodableShape {
        /// If the action fails for one or more of the phone numbers in the request, a  list of the phone numbers is returned, along with error codes and error messages.
        public let phoneNumberErrors: [PhoneNumberError]?

        @inlinable
        public init(phoneNumberErrors: [PhoneNumberError]? = nil) {
            self.phoneNumberErrors = phoneNumberErrors
        }

        private enum CodingKeys: String, CodingKey {
            case phoneNumberErrors = "PhoneNumberErrors"
        }
    }

    public struct EmergencyCallingConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The Dialed Number Identification Service (DNIS) emergency calling configuration  details.
        public let dnis: [DNISEmergencyCallingConfiguration]?

        @inlinable
        public init(dnis: [DNISEmergencyCallingConfiguration]? = nil) {
            self.dnis = dnis
        }

        public func validate(name: String) throws {
            try self.dnis?.forEach {
                try $0.validate(name: "\(name).dnis[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case dnis = "DNIS"
        }
    }

    public struct ExternalSystemsConfiguration: AWSDecodableShape {
        /// The contact center system.
        public let contactCenterSystemTypes: [ContactCenterSystemType]?
        /// The session border controllers.
        public let sessionBorderControllerTypes: [SessionBorderControllerType]?

        @inlinable
        public init(contactCenterSystemTypes: [ContactCenterSystemType]? = nil, sessionBorderControllerTypes: [SessionBorderControllerType]? = nil) {
            self.contactCenterSystemTypes = contactCenterSystemTypes
            self.sessionBorderControllerTypes = sessionBorderControllerTypes
        }

        private enum CodingKeys: String, CodingKey {
            case contactCenterSystemTypes = "ContactCenterSystemTypes"
            case sessionBorderControllerTypes = "SessionBorderControllerTypes"
        }
    }

    public struct ForbiddenException: AWSErrorShape {
        public let code: ErrorCode?
        public let message: String?

        @inlinable
        public init(code: ErrorCode? = nil, message: String? = nil) {
            self.code = code
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case code = "Code"
            case message = "Message"
        }
    }

    public struct GeoMatchParams: AWSEncodableShape & AWSDecodableShape {
        /// The area code.
        public let areaCode: String
        /// The country.
        public let country: String

        @inlinable
        public init(areaCode: String, country: String) {
            self.areaCode = areaCode
            self.country = country
        }

        public func validate(name: String) throws {
            try self.validate(self.areaCode, name: "areaCode", parent: name, pattern: "^$|^[0-9]{3,3}$")
            try self.validate(self.country, name: "country", parent: name, pattern: "^$|^[A-Z]{2,2}$")
        }

        private enum CodingKeys: String, CodingKey {
            case areaCode = "AreaCode"
            case country = "Country"
        }
    }

    public struct GetGlobalSettingsResponse: AWSDecodableShape {
        /// The Voice Connector settings.
        public let voiceConnector: VoiceConnectorSettings?

        @inlinable
        public init(voiceConnector: VoiceConnectorSettings? = nil) {
            self.voiceConnector = voiceConnector
        }

        private enum CodingKeys: String, CodingKey {
            case voiceConnector = "VoiceConnector"
        }
    }

    public struct GetPhoneNumberOrderRequest: AWSEncodableShape {
        /// The ID of the phone number order .
        public let phoneNumberOrderId: String

        @inlinable
        public init(phoneNumberOrderId: String) {
            self.phoneNumberOrderId = phoneNumberOrderId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.phoneNumberOrderId, key: "PhoneNumberOrderId")
        }

        public func validate(name: String) throws {
            try self.validate(self.phoneNumberOrderId, name: "phoneNumberOrderId", parent: name, pattern: "^[a-fA-F0-9]{8}(?:-[a-fA-F0-9]{4}){3}-[a-fA-F0-9]{12}$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetPhoneNumberOrderResponse: AWSDecodableShape {
        /// The phone number order details.
        public let phoneNumberOrder: PhoneNumberOrder?

        @inlinable
        public init(phoneNumberOrder: PhoneNumberOrder? = nil) {
            self.phoneNumberOrder = phoneNumberOrder
        }

        private enum CodingKeys: String, CodingKey {
            case phoneNumberOrder = "PhoneNumberOrder"
        }
    }

    public struct GetPhoneNumberRequest: AWSEncodableShape {
        /// The phone number ID.
        public let phoneNumberId: String

        @inlinable
        public init(phoneNumberId: String) {
            self.phoneNumberId = phoneNumberId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.phoneNumberId, key: "PhoneNumberId")
        }

        public func validate(name: String) throws {
            try self.validate(self.phoneNumberId, name: "phoneNumberId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetPhoneNumberResponse: AWSDecodableShape {
        /// The phone number details.
        public let phoneNumber: PhoneNumber?

        @inlinable
        public init(phoneNumber: PhoneNumber? = nil) {
            self.phoneNumber = phoneNumber
        }

        private enum CodingKeys: String, CodingKey {
            case phoneNumber = "PhoneNumber"
        }
    }

    public struct GetPhoneNumberSettingsResponse: AWSDecodableShape {
        /// The default outbound calling name for the account.
        public let callingName: String?
        /// The updated outbound calling name timestamp, in ISO 8601 format.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var callingNameUpdatedTimestamp: Date?

        @inlinable
        public init(callingName: String? = nil, callingNameUpdatedTimestamp: Date? = nil) {
            self.callingName = callingName
            self.callingNameUpdatedTimestamp = callingNameUpdatedTimestamp
        }

        private enum CodingKeys: String, CodingKey {
            case callingName = "CallingName"
            case callingNameUpdatedTimestamp = "CallingNameUpdatedTimestamp"
        }
    }

    public struct GetProxySessionRequest: AWSEncodableShape {
        /// The proxy session ID.
        public let proxySessionId: String
        /// The Voice Connector ID.
        public let voiceConnectorId: String

        @inlinable
        public init(proxySessionId: String, voiceConnectorId: String) {
            self.proxySessionId = proxySessionId
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.proxySessionId, key: "ProxySessionId")
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.validate(self.proxySessionId, name: "proxySessionId", parent: name, max: 128)
            try self.validate(self.proxySessionId, name: "proxySessionId", parent: name, min: 1)
            try self.validate(self.proxySessionId, name: "proxySessionId", parent: name, pattern: "\\S")
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, max: 128)
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, min: 1)
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetProxySessionResponse: AWSDecodableShape {
        /// The proxy session details.
        public let proxySession: ProxySession?

        @inlinable
        public init(proxySession: ProxySession? = nil) {
            self.proxySession = proxySession
        }

        private enum CodingKeys: String, CodingKey {
            case proxySession = "ProxySession"
        }
    }

    public struct GetSipMediaApplicationAlexaSkillConfigurationRequest: AWSEncodableShape {
        /// The SIP media application ID.
        public let sipMediaApplicationId: String

        @inlinable
        public init(sipMediaApplicationId: String) {
            self.sipMediaApplicationId = sipMediaApplicationId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.sipMediaApplicationId, key: "SipMediaApplicationId")
        }

        public func validate(name: String) throws {
            try self.validate(self.sipMediaApplicationId, name: "sipMediaApplicationId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetSipMediaApplicationAlexaSkillConfigurationResponse: AWSDecodableShape {
        /// Returns the Alexa Skill configuration.
        public let sipMediaApplicationAlexaSkillConfiguration: SipMediaApplicationAlexaSkillConfiguration?

        @inlinable
        public init(sipMediaApplicationAlexaSkillConfiguration: SipMediaApplicationAlexaSkillConfiguration? = nil) {
            self.sipMediaApplicationAlexaSkillConfiguration = sipMediaApplicationAlexaSkillConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case sipMediaApplicationAlexaSkillConfiguration = "SipMediaApplicationAlexaSkillConfiguration"
        }
    }

    public struct GetSipMediaApplicationLoggingConfigurationRequest: AWSEncodableShape {
        /// The SIP media application ID.
        public let sipMediaApplicationId: String

        @inlinable
        public init(sipMediaApplicationId: String) {
            self.sipMediaApplicationId = sipMediaApplicationId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.sipMediaApplicationId, key: "SipMediaApplicationId")
        }

        public func validate(name: String) throws {
            try self.validate(self.sipMediaApplicationId, name: "sipMediaApplicationId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetSipMediaApplicationLoggingConfigurationResponse: AWSDecodableShape {
        /// The actual logging configuration.
        public let sipMediaApplicationLoggingConfiguration: SipMediaApplicationLoggingConfiguration?

        @inlinable
        public init(sipMediaApplicationLoggingConfiguration: SipMediaApplicationLoggingConfiguration? = nil) {
            self.sipMediaApplicationLoggingConfiguration = sipMediaApplicationLoggingConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case sipMediaApplicationLoggingConfiguration = "SipMediaApplicationLoggingConfiguration"
        }
    }

    public struct GetSipMediaApplicationRequest: AWSEncodableShape {
        /// The SIP media application ID .
        public let sipMediaApplicationId: String

        @inlinable
        public init(sipMediaApplicationId: String) {
            self.sipMediaApplicationId = sipMediaApplicationId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.sipMediaApplicationId, key: "SipMediaApplicationId")
        }

        public func validate(name: String) throws {
            try self.validate(self.sipMediaApplicationId, name: "sipMediaApplicationId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetSipMediaApplicationResponse: AWSDecodableShape {
        /// The details of the SIP media application.
        public let sipMediaApplication: SipMediaApplication?

        @inlinable
        public init(sipMediaApplication: SipMediaApplication? = nil) {
            self.sipMediaApplication = sipMediaApplication
        }

        private enum CodingKeys: String, CodingKey {
            case sipMediaApplication = "SipMediaApplication"
        }
    }

    public struct GetSipRuleRequest: AWSEncodableShape {
        /// The SIP rule ID.
        public let sipRuleId: String

        @inlinable
        public init(sipRuleId: String) {
            self.sipRuleId = sipRuleId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.sipRuleId, key: "SipRuleId")
        }

        public func validate(name: String) throws {
            try self.validate(self.sipRuleId, name: "sipRuleId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetSipRuleResponse: AWSDecodableShape {
        /// The SIP rule details.
        public let sipRule: SipRule?

        @inlinable
        public init(sipRule: SipRule? = nil) {
            self.sipRule = sipRule
        }

        private enum CodingKeys: String, CodingKey {
            case sipRule = "SipRule"
        }
    }

    public struct GetSpeakerSearchTaskRequest: AWSEncodableShape {
        /// The ID of the speaker search task.
        public let speakerSearchTaskId: String
        /// The Voice Connector ID.
        public let voiceConnectorId: String

        @inlinable
        public init(speakerSearchTaskId: String, voiceConnectorId: String) {
            self.speakerSearchTaskId = speakerSearchTaskId
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.speakerSearchTaskId, key: "SpeakerSearchTaskId")
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.validate(self.speakerSearchTaskId, name: "speakerSearchTaskId", parent: name, max: 256)
            try self.validate(self.speakerSearchTaskId, name: "speakerSearchTaskId", parent: name, min: 1)
            try self.validate(self.speakerSearchTaskId, name: "speakerSearchTaskId", parent: name, pattern: "\\S")
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, max: 128)
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, min: 1)
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetSpeakerSearchTaskResponse: AWSDecodableShape {
        /// The details of the speaker search task.
        public let speakerSearchTask: SpeakerSearchTask?

        @inlinable
        public init(speakerSearchTask: SpeakerSearchTask? = nil) {
            self.speakerSearchTask = speakerSearchTask
        }

        private enum CodingKeys: String, CodingKey {
            case speakerSearchTask = "SpeakerSearchTask"
        }
    }

    public struct GetVoiceConnectorEmergencyCallingConfigurationRequest: AWSEncodableShape {
        /// The Voice Connector ID.
        public let voiceConnectorId: String

        @inlinable
        public init(voiceConnectorId: String) {
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetVoiceConnectorEmergencyCallingConfigurationResponse: AWSDecodableShape {
        /// The details of the emergency calling configuration.
        public let emergencyCallingConfiguration: EmergencyCallingConfiguration?

        @inlinable
        public init(emergencyCallingConfiguration: EmergencyCallingConfiguration? = nil) {
            self.emergencyCallingConfiguration = emergencyCallingConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case emergencyCallingConfiguration = "EmergencyCallingConfiguration"
        }
    }

    public struct GetVoiceConnectorExternalSystemsConfigurationRequest: AWSEncodableShape {
        /// The ID of the Voice Connector for which to return information about the external system configuration.
        public let voiceConnectorId: String

        @inlinable
        public init(voiceConnectorId: String) {
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetVoiceConnectorExternalSystemsConfigurationResponse: AWSDecodableShape {
        /// An object that contains information about an external systems configuration for a Voice Connector.
        public let externalSystemsConfiguration: ExternalSystemsConfiguration?

        @inlinable
        public init(externalSystemsConfiguration: ExternalSystemsConfiguration? = nil) {
            self.externalSystemsConfiguration = externalSystemsConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case externalSystemsConfiguration = "ExternalSystemsConfiguration"
        }
    }

    public struct GetVoiceConnectorGroupRequest: AWSEncodableShape {
        /// The Voice Connector group ID.
        public let voiceConnectorGroupId: String

        @inlinable
        public init(voiceConnectorGroupId: String) {
            self.voiceConnectorGroupId = voiceConnectorGroupId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.voiceConnectorGroupId, key: "VoiceConnectorGroupId")
        }

        public func validate(name: String) throws {
            try self.validate(self.voiceConnectorGroupId, name: "voiceConnectorGroupId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetVoiceConnectorGroupResponse: AWSDecodableShape {
        /// The details of the Voice Connector group.
        public let voiceConnectorGroup: VoiceConnectorGroup?

        @inlinable
        public init(voiceConnectorGroup: VoiceConnectorGroup? = nil) {
            self.voiceConnectorGroup = voiceConnectorGroup
        }

        private enum CodingKeys: String, CodingKey {
            case voiceConnectorGroup = "VoiceConnectorGroup"
        }
    }

    public struct GetVoiceConnectorLoggingConfigurationRequest: AWSEncodableShape {
        /// The Voice Connector ID.
        public let voiceConnectorId: String

        @inlinable
        public init(voiceConnectorId: String) {
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetVoiceConnectorLoggingConfigurationResponse: AWSDecodableShape {
        /// The logging configuration details .
        public let loggingConfiguration: LoggingConfiguration?

        @inlinable
        public init(loggingConfiguration: LoggingConfiguration? = nil) {
            self.loggingConfiguration = loggingConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case loggingConfiguration = "LoggingConfiguration"
        }
    }

    public struct GetVoiceConnectorOriginationRequest: AWSEncodableShape {
        /// The Voice Connector ID.
        public let voiceConnectorId: String

        @inlinable
        public init(voiceConnectorId: String) {
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetVoiceConnectorOriginationResponse: AWSDecodableShape {
        /// The origination setting details.
        public let origination: Origination?

        @inlinable
        public init(origination: Origination? = nil) {
            self.origination = origination
        }

        private enum CodingKeys: String, CodingKey {
            case origination = "Origination"
        }
    }

    public struct GetVoiceConnectorProxyRequest: AWSEncodableShape {
        /// The Voice Connector ID.
        public let voiceConnectorId: String

        @inlinable
        public init(voiceConnectorId: String) {
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, max: 128)
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, min: 1)
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetVoiceConnectorProxyResponse: AWSDecodableShape {
        /// The proxy configuration details.
        public let proxy: Proxy?

        @inlinable
        public init(proxy: Proxy? = nil) {
            self.proxy = proxy
        }

        private enum CodingKeys: String, CodingKey {
            case proxy = "Proxy"
        }
    }

    public struct GetVoiceConnectorRequest: AWSEncodableShape {
        /// The Voice Connector ID.
        public let voiceConnectorId: String

        @inlinable
        public init(voiceConnectorId: String) {
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetVoiceConnectorResponse: AWSDecodableShape {
        /// The Voice Connector details.
        public let voiceConnector: VoiceConnector?

        @inlinable
        public init(voiceConnector: VoiceConnector? = nil) {
            self.voiceConnector = voiceConnector
        }

        private enum CodingKeys: String, CodingKey {
            case voiceConnector = "VoiceConnector"
        }
    }

    public struct GetVoiceConnectorStreamingConfigurationRequest: AWSEncodableShape {
        /// The Voice Connector ID.
        public let voiceConnectorId: String

        @inlinable
        public init(voiceConnectorId: String) {
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetVoiceConnectorStreamingConfigurationResponse: AWSDecodableShape {
        /// The details of the streaming configuration.
        public let streamingConfiguration: StreamingConfiguration?

        @inlinable
        public init(streamingConfiguration: StreamingConfiguration? = nil) {
            self.streamingConfiguration = streamingConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case streamingConfiguration = "StreamingConfiguration"
        }
    }

    public struct GetVoiceConnectorTerminationHealthRequest: AWSEncodableShape {
        /// The Voice Connector ID.
        public let voiceConnectorId: String

        @inlinable
        public init(voiceConnectorId: String) {
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetVoiceConnectorTerminationHealthResponse: AWSDecodableShape {
        /// The termination health details.
        public let terminationHealth: TerminationHealth?

        @inlinable
        public init(terminationHealth: TerminationHealth? = nil) {
            self.terminationHealth = terminationHealth
        }

        private enum CodingKeys: String, CodingKey {
            case terminationHealth = "TerminationHealth"
        }
    }

    public struct GetVoiceConnectorTerminationRequest: AWSEncodableShape {
        /// The Voice Connector ID.
        public let voiceConnectorId: String

        @inlinable
        public init(voiceConnectorId: String) {
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetVoiceConnectorTerminationResponse: AWSDecodableShape {
        /// The termination setting details.
        public let termination: Termination?

        @inlinable
        public init(termination: Termination? = nil) {
            self.termination = termination
        }

        private enum CodingKeys: String, CodingKey {
            case termination = "Termination"
        }
    }

    public struct GetVoiceProfileDomainRequest: AWSEncodableShape {
        /// The voice profile domain ID.
        public let voiceProfileDomainId: String

        @inlinable
        public init(voiceProfileDomainId: String) {
            self.voiceProfileDomainId = voiceProfileDomainId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.voiceProfileDomainId, key: "VoiceProfileDomainId")
        }

        public func validate(name: String) throws {
            try self.validate(self.voiceProfileDomainId, name: "voiceProfileDomainId", parent: name, max: 256)
            try self.validate(self.voiceProfileDomainId, name: "voiceProfileDomainId", parent: name, min: 1)
            try self.validate(self.voiceProfileDomainId, name: "voiceProfileDomainId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetVoiceProfileDomainResponse: AWSDecodableShape {
        /// The details of the voice profile domain.
        public let voiceProfileDomain: VoiceProfileDomain?

        @inlinable
        public init(voiceProfileDomain: VoiceProfileDomain? = nil) {
            self.voiceProfileDomain = voiceProfileDomain
        }

        private enum CodingKeys: String, CodingKey {
            case voiceProfileDomain = "VoiceProfileDomain"
        }
    }

    public struct GetVoiceProfileRequest: AWSEncodableShape {
        /// The voice profile ID.
        public let voiceProfileId: String

        @inlinable
        public init(voiceProfileId: String) {
            self.voiceProfileId = voiceProfileId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.voiceProfileId, key: "VoiceProfileId")
        }

        public func validate(name: String) throws {
            try self.validate(self.voiceProfileId, name: "voiceProfileId", parent: name, max: 256)
            try self.validate(self.voiceProfileId, name: "voiceProfileId", parent: name, min: 1)
            try self.validate(self.voiceProfileId, name: "voiceProfileId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetVoiceProfileResponse: AWSDecodableShape {
        /// The voice profile details.
        public let voiceProfile: VoiceProfile?

        @inlinable
        public init(voiceProfile: VoiceProfile? = nil) {
            self.voiceProfile = voiceProfile
        }

        private enum CodingKeys: String, CodingKey {
            case voiceProfile = "VoiceProfile"
        }
    }

    public struct GetVoiceToneAnalysisTaskRequest: AWSEncodableShape {
        /// Specifies whether the voice being analyzed is the caller (originator) or the callee (responder).
        public let isCaller: Bool
        /// The Voice Connector ID.
        public let voiceConnectorId: String
        /// The ID of the voice tone analysis task.
        public let voiceToneAnalysisTaskId: String

        @inlinable
        public init(isCaller: Bool, voiceConnectorId: String, voiceToneAnalysisTaskId: String) {
            self.isCaller = isCaller
            self.voiceConnectorId = voiceConnectorId
            self.voiceToneAnalysisTaskId = voiceToneAnalysisTaskId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.isCaller, key: "isCaller")
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
            request.encodePath(self.voiceToneAnalysisTaskId, key: "VoiceToneAnalysisTaskId")
        }

        public func validate(name: String) throws {
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, max: 128)
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, min: 1)
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
            try self.validate(self.voiceToneAnalysisTaskId, name: "voiceToneAnalysisTaskId", parent: name, max: 256)
            try self.validate(self.voiceToneAnalysisTaskId, name: "voiceToneAnalysisTaskId", parent: name, min: 1)
            try self.validate(self.voiceToneAnalysisTaskId, name: "voiceToneAnalysisTaskId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetVoiceToneAnalysisTaskResponse: AWSDecodableShape {
        /// The details of the voice tone analysis task.
        public let voiceToneAnalysisTask: VoiceToneAnalysisTask?

        @inlinable
        public init(voiceToneAnalysisTask: VoiceToneAnalysisTask? = nil) {
            self.voiceToneAnalysisTask = voiceToneAnalysisTask
        }

        private enum CodingKeys: String, CodingKey {
            case voiceToneAnalysisTask = "VoiceToneAnalysisTask"
        }
    }

    public struct GoneException: AWSErrorShape {
        public let code: ErrorCode?
        public let message: String?

        @inlinable
        public init(code: ErrorCode? = nil, message: String? = nil) {
            self.code = code
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case code = "Code"
            case message = "Message"
        }
    }

    public struct ListAvailableVoiceConnectorRegionsResponse: AWSDecodableShape {
        /// The list of AWS Regions.
        public let voiceConnectorRegions: [VoiceConnectorAwsRegion]?

        @inlinable
        public init(voiceConnectorRegions: [VoiceConnectorAwsRegion]? = nil) {
            self.voiceConnectorRegions = voiceConnectorRegions
        }

        private enum CodingKeys: String, CodingKey {
            case voiceConnectorRegions = "VoiceConnectorRegions"
        }
    }

    public struct ListPhoneNumberOrdersRequest: AWSEncodableShape {
        /// The maximum number of results to return in a single call.
        public let maxResults: Int?
        /// The token used to retrieve the next page of results.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "max-results")
            request.encodeQuery(self.nextToken, key: "next-token")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListPhoneNumberOrdersResponse: AWSDecodableShape {
        /// The token used to retrieve the next page of results.
        public let nextToken: String?
        /// The phone number order details.
        public let phoneNumberOrders: [PhoneNumberOrder]?

        @inlinable
        public init(nextToken: String? = nil, phoneNumberOrders: [PhoneNumberOrder]? = nil) {
            self.nextToken = nextToken
            self.phoneNumberOrders = phoneNumberOrders
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case phoneNumberOrders = "PhoneNumberOrders"
        }
    }

    public struct ListPhoneNumbersRequest: AWSEncodableShape {
        /// The filter to limit the number of results.
        public let filterName: PhoneNumberAssociationName?
        /// The filter value.
        public let filterValue: String?
        /// The maximum number of results to return in a single call.
        public let maxResults: Int?
        /// The token used to return the next page of results.
        public let nextToken: String?
        /// The phone number product types.
        public let productType: PhoneNumberProductType?
        /// The status of your organization's phone numbers.
        public let status: String?

        @inlinable
        public init(filterName: PhoneNumberAssociationName? = nil, filterValue: String? = nil, maxResults: Int? = nil, nextToken: String? = nil, productType: PhoneNumberProductType? = nil, status: String? = nil) {
            self.filterName = filterName
            self.filterValue = filterValue
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.productType = productType
            self.status = status
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.filterName, key: "filter-name")
            request.encodeQuery(self.filterValue, key: "filter-value")
            request.encodeQuery(self.maxResults, key: "max-results")
            request.encodeQuery(self.nextToken, key: "next-token")
            request.encodeQuery(self.productType, key: "product-type")
            request.encodeQuery(self.status, key: "status")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListPhoneNumbersResponse: AWSDecodableShape {
        /// The token used to return the next page of results.
        public let nextToken: String?
        /// The phone number details.
        public let phoneNumbers: [PhoneNumber]?

        @inlinable
        public init(nextToken: String? = nil, phoneNumbers: [PhoneNumber]? = nil) {
            self.nextToken = nextToken
            self.phoneNumbers = phoneNumbers
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case phoneNumbers = "PhoneNumbers"
        }
    }

    public struct ListProxySessionsRequest: AWSEncodableShape {
        /// The maximum number of results to return in a single call.
        public let maxResults: Int?
        /// The token used to retrieve the next page of results.
        public let nextToken: String?
        /// The proxy session status.
        public let status: ProxySessionStatus?
        /// The Voice Connector ID.
        public let voiceConnectorId: String

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, status: ProxySessionStatus? = nil, voiceConnectorId: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.status = status
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "max-results")
            request.encodeQuery(self.nextToken, key: "next-token")
            request.encodeQuery(self.status, key: "status")
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 65535)
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, max: 128)
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, min: 1)
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListProxySessionsResponse: AWSDecodableShape {
        /// The token used to retrieve the next page of results.
        public let nextToken: String?
        /// The proxy sessions' details.
        public let proxySessions: [ProxySession]?

        @inlinable
        public init(nextToken: String? = nil, proxySessions: [ProxySession]? = nil) {
            self.nextToken = nextToken
            self.proxySessions = proxySessions
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case proxySessions = "ProxySessions"
        }
    }

    public struct ListSipMediaApplicationsRequest: AWSEncodableShape {
        /// The maximum number of results to return in a single call. Defaults to 100.
        public let maxResults: Int?
        /// The token used to return the next page of results.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "max-results")
            request.encodeQuery(self.nextToken, key: "next-token")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 65535)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListSipMediaApplicationsResponse: AWSDecodableShape {
        /// The token used to return the next page of results.
        public let nextToken: String?
        /// The list of SIP media applications and application details.
        public let sipMediaApplications: [SipMediaApplication]?

        @inlinable
        public init(nextToken: String? = nil, sipMediaApplications: [SipMediaApplication]? = nil) {
            self.nextToken = nextToken
            self.sipMediaApplications = sipMediaApplications
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case sipMediaApplications = "SipMediaApplications"
        }
    }

    public struct ListSipRulesRequest: AWSEncodableShape {
        /// The maximum number of results to return in a single call. Defaults to 100.
        public let maxResults: Int?
        /// The token used to return the next page of results.
        public let nextToken: String?
        /// The SIP media application ID.
        public let sipMediaApplicationId: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, sipMediaApplicationId: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.sipMediaApplicationId = sipMediaApplicationId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "max-results")
            request.encodeQuery(self.nextToken, key: "next-token")
            request.encodeQuery(self.sipMediaApplicationId, key: "sip-media-application")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 65535)
            try self.validate(self.sipMediaApplicationId, name: "sipMediaApplicationId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListSipRulesResponse: AWSDecodableShape {
        /// The token used to return the next page of results.
        public let nextToken: String?
        /// The list of SIP rules and details.
        public let sipRules: [SipRule]?

        @inlinable
        public init(nextToken: String? = nil, sipRules: [SipRule]? = nil) {
            self.nextToken = nextToken
            self.sipRules = sipRules
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case sipRules = "SipRules"
        }
    }

    public struct ListSupportedPhoneNumberCountriesRequest: AWSEncodableShape {
        /// The phone number product type.
        public let productType: PhoneNumberProductType

        @inlinable
        public init(productType: PhoneNumberProductType) {
            self.productType = productType
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.productType, key: "product-type")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListSupportedPhoneNumberCountriesResponse: AWSDecodableShape {
        /// The supported phone number countries.
        public let phoneNumberCountries: [PhoneNumberCountry]?

        @inlinable
        public init(phoneNumberCountries: [PhoneNumberCountry]? = nil) {
            self.phoneNumberCountries = phoneNumberCountries
        }

        private enum CodingKeys: String, CodingKey {
            case phoneNumberCountries = "PhoneNumberCountries"
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        /// The resource ARN.
        public let resourceARN: String

        @inlinable
        public init(resourceARN: String) {
            self.resourceARN = resourceARN
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.resourceARN, key: "arn")
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 1024)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 1)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, pattern: "^arn[\\/\\:\\-\\_\\.a-zA-Z0-9]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        /// The tags in the list.
        public let tags: [Tag]?

        @inlinable
        public init(tags: [Tag]? = nil) {
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case tags = "Tags"
        }
    }

    public struct ListVoiceConnectorGroupsRequest: AWSEncodableShape {
        /// The maximum number of results to return in a single call.
        public let maxResults: Int?
        /// The token used to return the next page of results.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "max-results")
            request.encodeQuery(self.nextToken, key: "next-token")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListVoiceConnectorGroupsResponse: AWSDecodableShape {
        /// The token used to return the next page of results.
        public let nextToken: String?
        /// The details of the Voice Connector groups.
        public let voiceConnectorGroups: [VoiceConnectorGroup]?

        @inlinable
        public init(nextToken: String? = nil, voiceConnectorGroups: [VoiceConnectorGroup]? = nil) {
            self.nextToken = nextToken
            self.voiceConnectorGroups = voiceConnectorGroups
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case voiceConnectorGroups = "VoiceConnectorGroups"
        }
    }

    public struct ListVoiceConnectorTerminationCredentialsRequest: AWSEncodableShape {
        /// The Voice Connector ID.
        public let voiceConnectorId: String

        @inlinable
        public init(voiceConnectorId: String) {
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListVoiceConnectorTerminationCredentialsResponse: AWSDecodableShape {
        /// A list of user names.
        public let usernames: [String]?

        @inlinable
        public init(usernames: [String]? = nil) {
            self.usernames = usernames
        }

        private enum CodingKeys: String, CodingKey {
            case usernames = "Usernames"
        }
    }

    public struct ListVoiceConnectorsRequest: AWSEncodableShape {
        /// The maximum number of results to return in a single call.
        public let maxResults: Int?
        /// The token used to return the next page of results.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "max-results")
            request.encodeQuery(self.nextToken, key: "next-token")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListVoiceConnectorsResponse: AWSDecodableShape {
        /// The token used to return the next page of results.
        public let nextToken: String?
        /// The details of the Voice Connectors.
        public let voiceConnectors: [VoiceConnector]?

        @inlinable
        public init(nextToken: String? = nil, voiceConnectors: [VoiceConnector]? = nil) {
            self.nextToken = nextToken
            self.voiceConnectors = voiceConnectors
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case voiceConnectors = "VoiceConnectors"
        }
    }

    public struct ListVoiceProfileDomainsRequest: AWSEncodableShape {
        /// The maximum number of results to return in a single call.
        public let maxResults: Int?
        /// The token used to return the next page of results.
        public let nextToken: String?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "max-results")
            request.encodeQuery(self.nextToken, key: "next-token")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListVoiceProfileDomainsResponse: AWSDecodableShape {
        /// The token used to return the next page of results.
        public let nextToken: String?
        /// The list of voice profile domains.
        public let voiceProfileDomains: [VoiceProfileDomainSummary]?

        @inlinable
        public init(nextToken: String? = nil, voiceProfileDomains: [VoiceProfileDomainSummary]? = nil) {
            self.nextToken = nextToken
            self.voiceProfileDomains = voiceProfileDomains
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case voiceProfileDomains = "VoiceProfileDomains"
        }
    }

    public struct ListVoiceProfilesRequest: AWSEncodableShape {
        /// The maximum number of results in the request.
        public let maxResults: Int?
        /// The token used to retrieve the next page of results.
        public let nextToken: String?
        /// The ID of the voice profile domain.
        public let voiceProfileDomainId: String

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, voiceProfileDomainId: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.voiceProfileDomainId = voiceProfileDomainId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.maxResults, key: "max-results")
            request.encodeQuery(self.nextToken, key: "next-token")
            request.encodeQuery(self.voiceProfileDomainId, key: "voice-profile-domain-id")
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.voiceProfileDomainId, name: "voiceProfileDomainId", parent: name, max: 256)
            try self.validate(self.voiceProfileDomainId, name: "voiceProfileDomainId", parent: name, min: 1)
            try self.validate(self.voiceProfileDomainId, name: "voiceProfileDomainId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListVoiceProfilesResponse: AWSDecodableShape {
        /// The token used to retrieve the next page of results.
        public let nextToken: String?
        /// The list of voice profiles.
        public let voiceProfiles: [VoiceProfileSummary]?

        @inlinable
        public init(nextToken: String? = nil, voiceProfiles: [VoiceProfileSummary]? = nil) {
            self.nextToken = nextToken
            self.voiceProfiles = voiceProfiles
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case voiceProfiles = "VoiceProfiles"
        }
    }

    public struct LoggingConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Enables or disables media metrics logging.
        public let enableMediaMetricLogs: Bool?
        /// Boolean that enables sending SIP message logs to Amazon CloudWatch.
        public let enableSIPLogs: Bool?

        @inlinable
        public init(enableMediaMetricLogs: Bool? = nil, enableSIPLogs: Bool? = nil) {
            self.enableMediaMetricLogs = enableMediaMetricLogs
            self.enableSIPLogs = enableSIPLogs
        }

        private enum CodingKeys: String, CodingKey {
            case enableMediaMetricLogs = "EnableMediaMetricLogs"
            case enableSIPLogs = "EnableSIPLogs"
        }
    }

    public struct MediaInsightsConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The configuration's ARN.
        public let configurationArn: String?
        /// Denotes the configuration as enabled or disabled.
        public let disabled: Bool?

        @inlinable
        public init(configurationArn: String? = nil, disabled: Bool? = nil) {
            self.configurationArn = configurationArn
            self.disabled = disabled
        }

        public func validate(name: String) throws {
            try self.validate(self.configurationArn, name: "configurationArn", parent: name, max: 1024)
            try self.validate(self.configurationArn, name: "configurationArn", parent: name, min: 1)
            try self.validate(self.configurationArn, name: "configurationArn", parent: name, pattern: "^arn[\\/\\:\\-\\_\\.a-zA-Z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case configurationArn = "ConfigurationArn"
            case disabled = "Disabled"
        }
    }

    public struct NotFoundException: AWSErrorShape {
        public let code: ErrorCode?
        public let message: String?

        @inlinable
        public init(code: ErrorCode? = nil, message: String? = nil) {
            self.code = code
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case code = "Code"
            case message = "Message"
        }
    }

    public struct OrderedPhoneNumber: AWSDecodableShape {
        /// The phone number, in E.164 format.
        public let e164PhoneNumber: String?
        /// The phone number status.
        public let status: OrderedPhoneNumberStatus?

        @inlinable
        public init(e164PhoneNumber: String? = nil, status: OrderedPhoneNumberStatus? = nil) {
            self.e164PhoneNumber = e164PhoneNumber
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case e164PhoneNumber = "E164PhoneNumber"
            case status = "Status"
        }
    }

    public struct Origination: AWSEncodableShape & AWSDecodableShape {
        /// When origination settings are disabled, inbound calls are not enabled for your  Amazon Chime SDK Voice Connector.  This parameter is not required, but you must specify this parameter or  Routes.
        public let disabled: Bool?
        /// The call distribution properties defined for your SIP hosts. Valid range: Minimum  value of 1. Maximum value of 20. This parameter is not required, but you must specify  this parameter or Disabled.
        public let routes: [OriginationRoute]?

        @inlinable
        public init(disabled: Bool? = nil, routes: [OriginationRoute]? = nil) {
            self.disabled = disabled
            self.routes = routes
        }

        public func validate(name: String) throws {
            try self.routes?.forEach {
                try $0.validate(name: "\(name).routes[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case disabled = "Disabled"
            case routes = "Routes"
        }
    }

    public struct OriginationRoute: AWSEncodableShape & AWSDecodableShape {
        /// The FQDN or IP address to contact for origination traffic.
        public let host: String?
        /// The designated origination route port. Defaults to 5060.
        public let port: Int?
        /// The priority associated with the host, with 1 being the highest priority. Higher  priority hosts are attempted first.
        public let priority: Int?
        /// The protocol to use for the origination route. Encryption-enabled Amazon Chime SDK Voice Connectors use  TCP protocol by default.
        public let `protocol`: OriginationRouteProtocol?
        /// The weight assigned to an origination route. When hosts have equal priority,  calls are distributed between them based on their relative weights.
        public let weight: Int?

        @inlinable
        public init(host: String? = nil, port: Int? = nil, priority: Int? = nil, protocol: OriginationRouteProtocol? = nil, weight: Int? = nil) {
            self.host = host
            self.port = port
            self.priority = priority
            self.`protocol` = `protocol`
            self.weight = weight
        }

        public func validate(name: String) throws {
            try self.validate(self.port, name: "port", parent: name, max: 65535)
            try self.validate(self.port, name: "port", parent: name, min: 0)
            try self.validate(self.priority, name: "priority", parent: name, max: 100)
            try self.validate(self.priority, name: "priority", parent: name, min: 1)
            try self.validate(self.weight, name: "weight", parent: name, max: 100)
            try self.validate(self.weight, name: "weight", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case host = "Host"
            case port = "Port"
            case priority = "Priority"
            case `protocol` = "Protocol"
            case weight = "Weight"
        }
    }

    public struct Participant: AWSDecodableShape {
        /// The participant's phone number.
        public let phoneNumber: String?
        /// The participant's proxy phone number.
        public let proxyPhoneNumber: String?

        @inlinable
        public init(phoneNumber: String? = nil, proxyPhoneNumber: String? = nil) {
            self.phoneNumber = phoneNumber
            self.proxyPhoneNumber = proxyPhoneNumber
        }

        private enum CodingKeys: String, CodingKey {
            case phoneNumber = "PhoneNumber"
            case proxyPhoneNumber = "ProxyPhoneNumber"
        }
    }

    public struct PhoneNumber: AWSDecodableShape {
        /// The phone number's associations.
        public let associations: [PhoneNumberAssociation]?
        /// The outbound calling name associated with the phone number.
        public let callingName: String?
        /// The outbound calling name status.
        public let callingNameStatus: CallingNameStatus?
        /// The phone number's capabilities.
        public let capabilities: PhoneNumberCapabilities?
        /// The phone number's country. Format: ISO 3166-1 alpha-2.
        public let country: String?
        /// The phone number creation timestamp, in ISO 8601 format.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var createdTimestamp: Date?
        /// The deleted phone number timestamp, in ISO 8601 format.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var deletionTimestamp: Date?
        /// The phone number, in E.164 format.
        public let e164PhoneNumber: String?
        /// The name of the phone number.
        public let name: String?
        /// The phone number's order ID.
        public let orderId: String?
        /// The phone number's ID.
        public let phoneNumberId: String?
        /// The phone number's product type.
        public let productType: PhoneNumberProductType?
        /// The phone number's status.
        public let status: PhoneNumberStatus?
        /// The phone number's type.
        public let type: PhoneNumberType?
        /// The updated phone number timestamp, in ISO 8601 format.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var updatedTimestamp: Date?

        @inlinable
        public init(associations: [PhoneNumberAssociation]? = nil, callingName: String? = nil, callingNameStatus: CallingNameStatus? = nil, capabilities: PhoneNumberCapabilities? = nil, country: String? = nil, createdTimestamp: Date? = nil, deletionTimestamp: Date? = nil, e164PhoneNumber: String? = nil, name: String? = nil, orderId: String? = nil, phoneNumberId: String? = nil, productType: PhoneNumberProductType? = nil, status: PhoneNumberStatus? = nil, type: PhoneNumberType? = nil, updatedTimestamp: Date? = nil) {
            self.associations = associations
            self.callingName = callingName
            self.callingNameStatus = callingNameStatus
            self.capabilities = capabilities
            self.country = country
            self.createdTimestamp = createdTimestamp
            self.deletionTimestamp = deletionTimestamp
            self.e164PhoneNumber = e164PhoneNumber
            self.name = name
            self.orderId = orderId
            self.phoneNumberId = phoneNumberId
            self.productType = productType
            self.status = status
            self.type = type
            self.updatedTimestamp = updatedTimestamp
        }

        private enum CodingKeys: String, CodingKey {
            case associations = "Associations"
            case callingName = "CallingName"
            case callingNameStatus = "CallingNameStatus"
            case capabilities = "Capabilities"
            case country = "Country"
            case createdTimestamp = "CreatedTimestamp"
            case deletionTimestamp = "DeletionTimestamp"
            case e164PhoneNumber = "E164PhoneNumber"
            case name = "Name"
            case orderId = "OrderId"
            case phoneNumberId = "PhoneNumberId"
            case productType = "ProductType"
            case status = "Status"
            case type = "Type"
            case updatedTimestamp = "UpdatedTimestamp"
        }
    }

    public struct PhoneNumberAssociation: AWSDecodableShape {
        /// The timestamp of the phone number association, in ISO 8601 format.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var associatedTimestamp: Date?
        /// Defines the association with an Amazon Chime SDK account ID, user ID, Voice Connector ID, or Voice Connector group ID.
        public let name: PhoneNumberAssociationName?
        /// Contains the ID for the entity specified in Name.
        public let value: String?

        @inlinable
        public init(associatedTimestamp: Date? = nil, name: PhoneNumberAssociationName? = nil, value: String? = nil) {
            self.associatedTimestamp = associatedTimestamp
            self.name = name
            self.value = value
        }

        private enum CodingKeys: String, CodingKey {
            case associatedTimestamp = "AssociatedTimestamp"
            case name = "Name"
            case value = "Value"
        }
    }

    public struct PhoneNumberCapabilities: AWSDecodableShape {
        /// Allows or denies inbound calling for the specified phone number.
        public let inboundCall: Bool?
        /// Allows or denies inbound MMS messaging for the specified phone number.
        public let inboundMMS: Bool?
        /// Allows or denies inbound SMS messaging for the specified phone number.
        public let inboundSMS: Bool?
        /// Allows or denies outbound calling for the specified phone number.
        public let outboundCall: Bool?
        /// Allows or denies inbound MMS messaging for the specified phone number.
        public let outboundMMS: Bool?
        /// Allows or denies outbound SMS messaging for the specified phone number.
        public let outboundSMS: Bool?

        @inlinable
        public init(inboundCall: Bool? = nil, inboundMMS: Bool? = nil, inboundSMS: Bool? = nil, outboundCall: Bool? = nil, outboundMMS: Bool? = nil, outboundSMS: Bool? = nil) {
            self.inboundCall = inboundCall
            self.inboundMMS = inboundMMS
            self.inboundSMS = inboundSMS
            self.outboundCall = outboundCall
            self.outboundMMS = outboundMMS
            self.outboundSMS = outboundSMS
        }

        private enum CodingKeys: String, CodingKey {
            case inboundCall = "InboundCall"
            case inboundMMS = "InboundMMS"
            case inboundSMS = "InboundSMS"
            case outboundCall = "OutboundCall"
            case outboundMMS = "OutboundMMS"
            case outboundSMS = "OutboundSMS"
        }
    }

    public struct PhoneNumberCountry: AWSDecodableShape {
        /// The phone number country code. Format: ISO 3166-1 alpha-2.
        public let countryCode: String?
        /// The supported phone number types.
        public let supportedPhoneNumberTypes: [PhoneNumberType]?

        @inlinable
        public init(countryCode: String? = nil, supportedPhoneNumberTypes: [PhoneNumberType]? = nil) {
            self.countryCode = countryCode
            self.supportedPhoneNumberTypes = supportedPhoneNumberTypes
        }

        private enum CodingKeys: String, CodingKey {
            case countryCode = "CountryCode"
            case supportedPhoneNumberTypes = "SupportedPhoneNumberTypes"
        }
    }

    public struct PhoneNumberError: AWSDecodableShape {
        /// The error code.
        public let errorCode: ErrorCode?
        /// The error message.
        public let errorMessage: String?
        /// The phone number ID for which the action failed.
        public let phoneNumberId: String?

        @inlinable
        public init(errorCode: ErrorCode? = nil, errorMessage: String? = nil, phoneNumberId: String? = nil) {
            self.errorCode = errorCode
            self.errorMessage = errorMessage
            self.phoneNumberId = phoneNumberId
        }

        private enum CodingKeys: String, CodingKey {
            case errorCode = "ErrorCode"
            case errorMessage = "ErrorMessage"
            case phoneNumberId = "PhoneNumberId"
        }
    }

    public struct PhoneNumberOrder: AWSDecodableShape {
        /// The phone number order creation time stamp, in ISO 8601 format.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var createdTimestamp: Date?
        /// The Firm Order Commitment (FOC) date for phone number porting orders. This field is null if a phone number order is not a porting order.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var focDate: Date?
        /// The ordered phone number details, such as the phone number in E.164 format  and the phone number status.
        public let orderedPhoneNumbers: [OrderedPhoneNumber]?
        /// The type of phone number being ordered, local or toll-free.
        public let orderType: PhoneNumberOrderType?
        /// The ID of the phone order.
        public let phoneNumberOrderId: String?
        /// The phone number order product type.
        public let productType: PhoneNumberProductType?
        /// The status of the phone number order.
        public let status: PhoneNumberOrderStatus?
        /// The updated phone number order time stamp, in ISO 8601 format.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var updatedTimestamp: Date?

        @inlinable
        public init(createdTimestamp: Date? = nil, focDate: Date? = nil, orderedPhoneNumbers: [OrderedPhoneNumber]? = nil, orderType: PhoneNumberOrderType? = nil, phoneNumberOrderId: String? = nil, productType: PhoneNumberProductType? = nil, status: PhoneNumberOrderStatus? = nil, updatedTimestamp: Date? = nil) {
            self.createdTimestamp = createdTimestamp
            self.focDate = focDate
            self.orderedPhoneNumbers = orderedPhoneNumbers
            self.orderType = orderType
            self.phoneNumberOrderId = phoneNumberOrderId
            self.productType = productType
            self.status = status
            self.updatedTimestamp = updatedTimestamp
        }

        private enum CodingKeys: String, CodingKey {
            case createdTimestamp = "CreatedTimestamp"
            case focDate = "FocDate"
            case orderedPhoneNumbers = "OrderedPhoneNumbers"
            case orderType = "OrderType"
            case phoneNumberOrderId = "PhoneNumberOrderId"
            case productType = "ProductType"
            case status = "Status"
            case updatedTimestamp = "UpdatedTimestamp"
        }
    }

    public struct Proxy: AWSDecodableShape {
        /// The default number of minutes allowed for proxy sessions.
        public let defaultSessionExpiryMinutes: Int?
        /// When true, stops proxy sessions from being created on the specified Amazon Chime SDK Voice Connector.
        public let disabled: Bool?
        /// The phone number to route calls to after a proxy session expires.
        public let fallBackPhoneNumber: String?
        /// The countries for proxy phone numbers to be selected from.
        public let phoneNumberCountries: [String]?

        @inlinable
        public init(defaultSessionExpiryMinutes: Int? = nil, disabled: Bool? = nil, fallBackPhoneNumber: String? = nil, phoneNumberCountries: [String]? = nil) {
            self.defaultSessionExpiryMinutes = defaultSessionExpiryMinutes
            self.disabled = disabled
            self.fallBackPhoneNumber = fallBackPhoneNumber
            self.phoneNumberCountries = phoneNumberCountries
        }

        private enum CodingKeys: String, CodingKey {
            case defaultSessionExpiryMinutes = "DefaultSessionExpiryMinutes"
            case disabled = "Disabled"
            case fallBackPhoneNumber = "FallBackPhoneNumber"
            case phoneNumberCountries = "PhoneNumberCountries"
        }
    }

    public struct ProxySession: AWSDecodableShape {
        /// The proxy session capabilities.
        public let capabilities: [Capability]?
        /// The created time stamp, in ISO 8601 format.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var createdTimestamp: Date?
        /// The ended time stamp, in ISO 8601 format.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var endedTimestamp: Date?
        /// The number of minutes allowed for the proxy session.
        public let expiryMinutes: Int?
        /// The preference for matching the country or area code of the proxy phone number with that of the first participant.
        public let geoMatchLevel: GeoMatchLevel?
        /// The country and area code for the proxy phone number.
        public let geoMatchParams: GeoMatchParams?
        /// The proxy session name.
        public let name: String?
        /// The preference for proxy phone number reuse, or stickiness, between the same participants across sessions.
        public let numberSelectionBehavior: NumberSelectionBehavior?
        /// The proxy session participants.
        public let participants: [Participant]?
        /// The proxy session ID.
        public let proxySessionId: String?
        /// The proxy session status.
        public let status: ProxySessionStatus?
        /// The updated time stamp, in ISO 8601 format.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var updatedTimestamp: Date?
        /// The Voice Connector ID.
        public let voiceConnectorId: String?

        @inlinable
        public init(capabilities: [Capability]? = nil, createdTimestamp: Date? = nil, endedTimestamp: Date? = nil, expiryMinutes: Int? = nil, geoMatchLevel: GeoMatchLevel? = nil, geoMatchParams: GeoMatchParams? = nil, name: String? = nil, numberSelectionBehavior: NumberSelectionBehavior? = nil, participants: [Participant]? = nil, proxySessionId: String? = nil, status: ProxySessionStatus? = nil, updatedTimestamp: Date? = nil, voiceConnectorId: String? = nil) {
            self.capabilities = capabilities
            self.createdTimestamp = createdTimestamp
            self.endedTimestamp = endedTimestamp
            self.expiryMinutes = expiryMinutes
            self.geoMatchLevel = geoMatchLevel
            self.geoMatchParams = geoMatchParams
            self.name = name
            self.numberSelectionBehavior = numberSelectionBehavior
            self.participants = participants
            self.proxySessionId = proxySessionId
            self.status = status
            self.updatedTimestamp = updatedTimestamp
            self.voiceConnectorId = voiceConnectorId
        }

        private enum CodingKeys: String, CodingKey {
            case capabilities = "Capabilities"
            case createdTimestamp = "CreatedTimestamp"
            case endedTimestamp = "EndedTimestamp"
            case expiryMinutes = "ExpiryMinutes"
            case geoMatchLevel = "GeoMatchLevel"
            case geoMatchParams = "GeoMatchParams"
            case name = "Name"
            case numberSelectionBehavior = "NumberSelectionBehavior"
            case participants = "Participants"
            case proxySessionId = "ProxySessionId"
            case status = "Status"
            case updatedTimestamp = "UpdatedTimestamp"
            case voiceConnectorId = "VoiceConnectorId"
        }
    }

    public struct PutSipMediaApplicationAlexaSkillConfigurationRequest: AWSEncodableShape {
        /// The Alexa Skill configuration.
        public let sipMediaApplicationAlexaSkillConfiguration: SipMediaApplicationAlexaSkillConfiguration?
        /// The SIP media application ID.
        public let sipMediaApplicationId: String

        @inlinable
        public init(sipMediaApplicationAlexaSkillConfiguration: SipMediaApplicationAlexaSkillConfiguration? = nil, sipMediaApplicationId: String) {
            self.sipMediaApplicationAlexaSkillConfiguration = sipMediaApplicationAlexaSkillConfiguration
            self.sipMediaApplicationId = sipMediaApplicationId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.sipMediaApplicationAlexaSkillConfiguration, forKey: .sipMediaApplicationAlexaSkillConfiguration)
            request.encodePath(self.sipMediaApplicationId, key: "SipMediaApplicationId")
        }

        public func validate(name: String) throws {
            try self.sipMediaApplicationAlexaSkillConfiguration?.validate(name: "\(name).sipMediaApplicationAlexaSkillConfiguration")
            try self.validate(self.sipMediaApplicationId, name: "sipMediaApplicationId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case sipMediaApplicationAlexaSkillConfiguration = "SipMediaApplicationAlexaSkillConfiguration"
        }
    }

    public struct PutSipMediaApplicationAlexaSkillConfigurationResponse: AWSDecodableShape {
        /// Returns the Alexa Skill configuration.
        public let sipMediaApplicationAlexaSkillConfiguration: SipMediaApplicationAlexaSkillConfiguration?

        @inlinable
        public init(sipMediaApplicationAlexaSkillConfiguration: SipMediaApplicationAlexaSkillConfiguration? = nil) {
            self.sipMediaApplicationAlexaSkillConfiguration = sipMediaApplicationAlexaSkillConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case sipMediaApplicationAlexaSkillConfiguration = "SipMediaApplicationAlexaSkillConfiguration"
        }
    }

    public struct PutSipMediaApplicationLoggingConfigurationRequest: AWSEncodableShape {
        /// The SIP media application ID.
        public let sipMediaApplicationId: String
        /// The logging configuration for the specified SIP media application.
        public let sipMediaApplicationLoggingConfiguration: SipMediaApplicationLoggingConfiguration?

        @inlinable
        public init(sipMediaApplicationId: String, sipMediaApplicationLoggingConfiguration: SipMediaApplicationLoggingConfiguration? = nil) {
            self.sipMediaApplicationId = sipMediaApplicationId
            self.sipMediaApplicationLoggingConfiguration = sipMediaApplicationLoggingConfiguration
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.sipMediaApplicationId, key: "SipMediaApplicationId")
            try container.encodeIfPresent(self.sipMediaApplicationLoggingConfiguration, forKey: .sipMediaApplicationLoggingConfiguration)
        }

        public func validate(name: String) throws {
            try self.validate(self.sipMediaApplicationId, name: "sipMediaApplicationId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case sipMediaApplicationLoggingConfiguration = "SipMediaApplicationLoggingConfiguration"
        }
    }

    public struct PutSipMediaApplicationLoggingConfigurationResponse: AWSDecodableShape {
        /// The updated logging configuration for the specified SIP media application.
        public let sipMediaApplicationLoggingConfiguration: SipMediaApplicationLoggingConfiguration?

        @inlinable
        public init(sipMediaApplicationLoggingConfiguration: SipMediaApplicationLoggingConfiguration? = nil) {
            self.sipMediaApplicationLoggingConfiguration = sipMediaApplicationLoggingConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case sipMediaApplicationLoggingConfiguration = "SipMediaApplicationLoggingConfiguration"
        }
    }

    public struct PutVoiceConnectorEmergencyCallingConfigurationRequest: AWSEncodableShape {
        /// The configuration being updated.
        public let emergencyCallingConfiguration: EmergencyCallingConfiguration
        /// The Voice Connector ID.
        public let voiceConnectorId: String

        @inlinable
        public init(emergencyCallingConfiguration: EmergencyCallingConfiguration, voiceConnectorId: String) {
            self.emergencyCallingConfiguration = emergencyCallingConfiguration
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encode(self.emergencyCallingConfiguration, forKey: .emergencyCallingConfiguration)
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.emergencyCallingConfiguration.validate(name: "\(name).emergencyCallingConfiguration")
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case emergencyCallingConfiguration = "EmergencyCallingConfiguration"
        }
    }

    public struct PutVoiceConnectorEmergencyCallingConfigurationResponse: AWSDecodableShape {
        /// The updated configuration.
        public let emergencyCallingConfiguration: EmergencyCallingConfiguration?

        @inlinable
        public init(emergencyCallingConfiguration: EmergencyCallingConfiguration? = nil) {
            self.emergencyCallingConfiguration = emergencyCallingConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case emergencyCallingConfiguration = "EmergencyCallingConfiguration"
        }
    }

    public struct PutVoiceConnectorExternalSystemsConfigurationRequest: AWSEncodableShape {
        /// The contact center system to use.
        public let contactCenterSystemTypes: [ContactCenterSystemType]?
        /// The session border controllers to use.
        public let sessionBorderControllerTypes: [SessionBorderControllerType]?
        /// The ID of the Voice Connector for which to add the external system configuration.
        public let voiceConnectorId: String

        @inlinable
        public init(contactCenterSystemTypes: [ContactCenterSystemType]? = nil, sessionBorderControllerTypes: [SessionBorderControllerType]? = nil, voiceConnectorId: String) {
            self.contactCenterSystemTypes = contactCenterSystemTypes
            self.sessionBorderControllerTypes = sessionBorderControllerTypes
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.contactCenterSystemTypes, forKey: .contactCenterSystemTypes)
            try container.encodeIfPresent(self.sessionBorderControllerTypes, forKey: .sessionBorderControllerTypes)
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, max: 128)
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, min: 1)
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case contactCenterSystemTypes = "ContactCenterSystemTypes"
            case sessionBorderControllerTypes = "SessionBorderControllerTypes"
        }
    }

    public struct PutVoiceConnectorExternalSystemsConfigurationResponse: AWSDecodableShape {
        /// An object that contains information about an external systems configuration for a Voice Connector.
        public let externalSystemsConfiguration: ExternalSystemsConfiguration?

        @inlinable
        public init(externalSystemsConfiguration: ExternalSystemsConfiguration? = nil) {
            self.externalSystemsConfiguration = externalSystemsConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case externalSystemsConfiguration = "ExternalSystemsConfiguration"
        }
    }

    public struct PutVoiceConnectorLoggingConfigurationRequest: AWSEncodableShape {
        /// The logging configuration being updated.
        public let loggingConfiguration: LoggingConfiguration
        /// The Voice Connector ID.
        public let voiceConnectorId: String

        @inlinable
        public init(loggingConfiguration: LoggingConfiguration, voiceConnectorId: String) {
            self.loggingConfiguration = loggingConfiguration
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encode(self.loggingConfiguration, forKey: .loggingConfiguration)
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case loggingConfiguration = "LoggingConfiguration"
        }
    }

    public struct PutVoiceConnectorLoggingConfigurationResponse: AWSDecodableShape {
        /// The updated logging configuration.
        public let loggingConfiguration: LoggingConfiguration?

        @inlinable
        public init(loggingConfiguration: LoggingConfiguration? = nil) {
            self.loggingConfiguration = loggingConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case loggingConfiguration = "LoggingConfiguration"
        }
    }

    public struct PutVoiceConnectorOriginationRequest: AWSEncodableShape {
        /// The origination settings being updated.
        public let origination: Origination
        /// The Voice Connector ID.
        public let voiceConnectorId: String

        @inlinable
        public init(origination: Origination, voiceConnectorId: String) {
            self.origination = origination
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encode(self.origination, forKey: .origination)
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.origination.validate(name: "\(name).origination")
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case origination = "Origination"
        }
    }

    public struct PutVoiceConnectorOriginationResponse: AWSDecodableShape {
        /// The updated origination settings.
        public let origination: Origination?

        @inlinable
        public init(origination: Origination? = nil) {
            self.origination = origination
        }

        private enum CodingKeys: String, CodingKey {
            case origination = "Origination"
        }
    }

    public struct PutVoiceConnectorProxyRequest: AWSEncodableShape {
        /// The default number of minutes allowed for proxy session.
        public let defaultSessionExpiryMinutes: Int
        /// When true, stops proxy sessions from being created on the specified Amazon Chime SDK Voice Connector.
        public let disabled: Bool?
        /// The phone number to route calls to after a proxy session expires.
        public let fallBackPhoneNumber: String?
        /// The countries for proxy phone numbers to be selected from.
        public let phoneNumberPoolCountries: [String]
        /// The Voice Connector ID.
        public let voiceConnectorId: String

        @inlinable
        public init(defaultSessionExpiryMinutes: Int, disabled: Bool? = nil, fallBackPhoneNumber: String? = nil, phoneNumberPoolCountries: [String], voiceConnectorId: String) {
            self.defaultSessionExpiryMinutes = defaultSessionExpiryMinutes
            self.disabled = disabled
            self.fallBackPhoneNumber = fallBackPhoneNumber
            self.phoneNumberPoolCountries = phoneNumberPoolCountries
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encode(self.defaultSessionExpiryMinutes, forKey: .defaultSessionExpiryMinutes)
            try container.encodeIfPresent(self.disabled, forKey: .disabled)
            try container.encodeIfPresent(self.fallBackPhoneNumber, forKey: .fallBackPhoneNumber)
            try container.encode(self.phoneNumberPoolCountries, forKey: .phoneNumberPoolCountries)
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.validate(self.fallBackPhoneNumber, name: "fallBackPhoneNumber", parent: name, pattern: "^\\+?[1-9]\\d{1,14}$")
            try self.phoneNumberPoolCountries.forEach {
                try validate($0, name: "phoneNumberPoolCountries[]", parent: name, pattern: "^$|^[A-Z]{2,2}$")
            }
            try self.validate(self.phoneNumberPoolCountries, name: "phoneNumberPoolCountries", parent: name, max: 100)
            try self.validate(self.phoneNumberPoolCountries, name: "phoneNumberPoolCountries", parent: name, min: 1)
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, max: 128)
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, min: 1)
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case defaultSessionExpiryMinutes = "DefaultSessionExpiryMinutes"
            case disabled = "Disabled"
            case fallBackPhoneNumber = "FallBackPhoneNumber"
            case phoneNumberPoolCountries = "PhoneNumberPoolCountries"
        }
    }

    public struct PutVoiceConnectorProxyResponse: AWSDecodableShape {
        /// The proxy configuration details.
        public let proxy: Proxy?

        @inlinable
        public init(proxy: Proxy? = nil) {
            self.proxy = proxy
        }

        private enum CodingKeys: String, CodingKey {
            case proxy = "Proxy"
        }
    }

    public struct PutVoiceConnectorStreamingConfigurationRequest: AWSEncodableShape {
        /// The streaming settings being updated.
        public let streamingConfiguration: StreamingConfiguration
        /// The Voice Connector ID.
        public let voiceConnectorId: String

        @inlinable
        public init(streamingConfiguration: StreamingConfiguration, voiceConnectorId: String) {
            self.streamingConfiguration = streamingConfiguration
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encode(self.streamingConfiguration, forKey: .streamingConfiguration)
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.streamingConfiguration.validate(name: "\(name).streamingConfiguration")
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case streamingConfiguration = "StreamingConfiguration"
        }
    }

    public struct PutVoiceConnectorStreamingConfigurationResponse: AWSDecodableShape {
        /// The updated streaming settings.
        public let streamingConfiguration: StreamingConfiguration?

        @inlinable
        public init(streamingConfiguration: StreamingConfiguration? = nil) {
            self.streamingConfiguration = streamingConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case streamingConfiguration = "StreamingConfiguration"
        }
    }

    public struct PutVoiceConnectorTerminationCredentialsRequest: AWSEncodableShape {
        /// The termination credentials being updated.
        public let credentials: [Credential]?
        /// The Voice Connector ID.
        public let voiceConnectorId: String

        @inlinable
        public init(credentials: [Credential]? = nil, voiceConnectorId: String) {
            self.credentials = credentials
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.credentials, forKey: .credentials)
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case credentials = "Credentials"
        }
    }

    public struct PutVoiceConnectorTerminationRequest: AWSEncodableShape {
        /// The termination settings to be updated.
        public let termination: Termination
        /// The Voice Connector ID.
        public let voiceConnectorId: String

        @inlinable
        public init(termination: Termination, voiceConnectorId: String) {
            self.termination = termination
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encode(self.termination, forKey: .termination)
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.termination.validate(name: "\(name).termination")
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case termination = "Termination"
        }
    }

    public struct PutVoiceConnectorTerminationResponse: AWSDecodableShape {
        /// The updated termination settings.
        public let termination: Termination?

        @inlinable
        public init(termination: Termination? = nil) {
            self.termination = termination
        }

        private enum CodingKeys: String, CodingKey {
            case termination = "Termination"
        }
    }

    public struct ResourceLimitExceededException: AWSErrorShape {
        public let code: ErrorCode?
        public let message: String?

        @inlinable
        public init(code: ErrorCode? = nil, message: String? = nil) {
            self.code = code
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case code = "Code"
            case message = "Message"
        }
    }

    public struct RestorePhoneNumberRequest: AWSEncodableShape {
        /// The ID of the phone number being restored.
        public let phoneNumberId: String

        @inlinable
        public init(phoneNumberId: String) {
            self.phoneNumberId = phoneNumberId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.phoneNumberId, key: "PhoneNumberId")
        }

        public func validate(name: String) throws {
            try self.validate(self.phoneNumberId, name: "phoneNumberId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct RestorePhoneNumberResponse: AWSDecodableShape {
        /// The restored phone number.
        public let phoneNumber: PhoneNumber?

        @inlinable
        public init(phoneNumber: PhoneNumber? = nil) {
            self.phoneNumber = phoneNumber
        }

        private enum CodingKeys: String, CodingKey {
            case phoneNumber = "PhoneNumber"
        }
    }

    public struct SearchAvailablePhoneNumbersRequest: AWSEncodableShape {
        /// Confines a search to just the phone numbers associated with the specified area code.
        public let areaCode: String?
        /// Confines a search to just the phone numbers associated with the specified city.
        public let city: String?
        /// Confines a search to just the phone numbers associated with the specified country.
        public let country: String?
        /// The maximum number of results to return.
        public let maxResults: Int?
        /// The token used to return the next page of results.
        public let nextToken: String?
        /// Confines a search to just the phone numbers associated with the specified phone number type, either local or toll-free.
        public let phoneNumberType: PhoneNumberType?
        /// Confines a search to just the phone numbers associated with the specified state.
        public let state: String?
        /// Confines a search to just the phone numbers associated with the specified toll-free prefix.
        public let tollFreePrefix: String?

        @inlinable
        public init(areaCode: String? = nil, city: String? = nil, country: String? = nil, maxResults: Int? = nil, nextToken: String? = nil, phoneNumberType: PhoneNumberType? = nil, state: String? = nil, tollFreePrefix: String? = nil) {
            self.areaCode = areaCode
            self.city = city
            self.country = country
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.phoneNumberType = phoneNumberType
            self.state = state
            self.tollFreePrefix = tollFreePrefix
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodeQuery(self.areaCode, key: "area-code")
            request.encodeQuery(self.city, key: "city")
            request.encodeQuery(self.country, key: "country")
            request.encodeQuery(self.maxResults, key: "max-results")
            request.encodeQuery(self.nextToken, key: "next-token")
            request.encodeQuery(self.phoneNumberType, key: "phone-number-type")
            request.encodeQuery(self.state, key: "state")
            request.encodeQuery(self.tollFreePrefix, key: "toll-free-prefix")
        }

        public func validate(name: String) throws {
            try self.validate(self.country, name: "country", parent: name, pattern: "^[A-Z]{2}$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.tollFreePrefix, name: "tollFreePrefix", parent: name, max: 3)
            try self.validate(self.tollFreePrefix, name: "tollFreePrefix", parent: name, min: 3)
            try self.validate(self.tollFreePrefix, name: "tollFreePrefix", parent: name, pattern: "^8(00|33|44|55|66|77|88)$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct SearchAvailablePhoneNumbersResponse: AWSDecodableShape {
        /// Confines a search to just the phone numbers in the E.164 format.
        public let e164PhoneNumbers: [String]?
        /// The token used to return the next page of results.
        public let nextToken: String?

        @inlinable
        public init(e164PhoneNumbers: [String]? = nil, nextToken: String? = nil) {
            self.e164PhoneNumbers = e164PhoneNumbers
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case e164PhoneNumbers = "E164PhoneNumbers"
            case nextToken = "NextToken"
        }
    }

    public struct ServerSideEncryptionConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The ARN of the KMS key used to encrypt the enrollment data in a voice profile domain.  Asymmetric customer managed keys are not supported.
        public let kmsKeyArn: String

        @inlinable
        public init(kmsKeyArn: String) {
            self.kmsKeyArn = kmsKeyArn
        }

        public func validate(name: String) throws {
            try self.validate(self.kmsKeyArn, name: "kmsKeyArn", parent: name, max: 1024)
            try self.validate(self.kmsKeyArn, name: "kmsKeyArn", parent: name, min: 1)
            try self.validate(self.kmsKeyArn, name: "kmsKeyArn", parent: name, pattern: "^arn[\\/\\:\\-\\_\\.a-zA-Z0-9]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case kmsKeyArn = "KmsKeyArn"
        }
    }

    public struct ServiceFailureException: AWSErrorShape {
        public let code: ErrorCode?
        public let message: String?

        @inlinable
        public init(code: ErrorCode? = nil, message: String? = nil) {
            self.code = code
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case code = "Code"
            case message = "Message"
        }
    }

    public struct ServiceUnavailableException: AWSErrorShape {
        public let code: ErrorCode?
        public let message: String?

        @inlinable
        public init(code: ErrorCode? = nil, message: String? = nil) {
            self.code = code
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case code = "Code"
            case message = "Message"
        }
    }

    public struct SipMediaApplication: AWSDecodableShape {
        /// The AWS Region in which the SIP media application is created.
        public let awsRegion: String?
        /// The SIP media application creation timestamp, in ISO 8601 format.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var createdTimestamp: Date?
        /// List of endpoints for a SIP media application. Currently, only one endpoint per  SIP media application is permitted.
        public let endpoints: [SipMediaApplicationEndpoint]?
        /// The SIP media application's name.
        public let name: String?
        /// The ARN of the SIP media application.
        public let sipMediaApplicationArn: String?
        /// A SIP media application's ID.
        public let sipMediaApplicationId: String?
        /// The time at which the SIP media application was updated.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var updatedTimestamp: Date?

        @inlinable
        public init(awsRegion: String? = nil, createdTimestamp: Date? = nil, endpoints: [SipMediaApplicationEndpoint]? = nil, name: String? = nil, sipMediaApplicationArn: String? = nil, sipMediaApplicationId: String? = nil, updatedTimestamp: Date? = nil) {
            self.awsRegion = awsRegion
            self.createdTimestamp = createdTimestamp
            self.endpoints = endpoints
            self.name = name
            self.sipMediaApplicationArn = sipMediaApplicationArn
            self.sipMediaApplicationId = sipMediaApplicationId
            self.updatedTimestamp = updatedTimestamp
        }

        private enum CodingKeys: String, CodingKey {
            case awsRegion = "AwsRegion"
            case createdTimestamp = "CreatedTimestamp"
            case endpoints = "Endpoints"
            case name = "Name"
            case sipMediaApplicationArn = "SipMediaApplicationArn"
            case sipMediaApplicationId = "SipMediaApplicationId"
            case updatedTimestamp = "UpdatedTimestamp"
        }
    }

    public struct SipMediaApplicationAlexaSkillConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The ID of the Alexa Skill configuration.
        public let alexaSkillIds: [String]
        /// The status of the Alexa Skill configuration.
        public let alexaSkillStatus: AlexaSkillStatus

        @inlinable
        public init(alexaSkillIds: [String], alexaSkillStatus: AlexaSkillStatus) {
            self.alexaSkillIds = alexaSkillIds
            self.alexaSkillStatus = alexaSkillStatus
        }

        public func validate(name: String) throws {
            try self.alexaSkillIds.forEach {
                try validate($0, name: "alexaSkillIds[]", parent: name, max: 64)
                try validate($0, name: "alexaSkillIds[]", parent: name, pattern: "^amzn1\\.application-oa2-client\\.[0-9a-fA-F]{32}$")
            }
            try self.validate(self.alexaSkillIds, name: "alexaSkillIds", parent: name, max: 1)
            try self.validate(self.alexaSkillIds, name: "alexaSkillIds", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case alexaSkillIds = "AlexaSkillIds"
            case alexaSkillStatus = "AlexaSkillStatus"
        }
    }

    public struct SipMediaApplicationCall: AWSDecodableShape {
        /// The call's transaction ID.
        public let transactionId: String?

        @inlinable
        public init(transactionId: String? = nil) {
            self.transactionId = transactionId
        }

        private enum CodingKeys: String, CodingKey {
            case transactionId = "TransactionId"
        }
    }

    public struct SipMediaApplicationEndpoint: AWSEncodableShape & AWSDecodableShape {
        /// Valid Amazon Resource Name (ARN) of the Lambda function, version, or alias.  The function must be created in the same AWS Region as the SIP media application.
        public let lambdaArn: String?

        @inlinable
        public init(lambdaArn: String? = nil) {
            self.lambdaArn = lambdaArn
        }

        public func validate(name: String) throws {
            try self.validate(self.lambdaArn, name: "lambdaArn", parent: name, max: 10000)
            try self.validate(self.lambdaArn, name: "lambdaArn", parent: name, pattern: "^arn:(aws[a-zA-Z-]*)?:lambda:[a-z]{2}((-gov)|(-iso(b?)))?-[a-z]+-\\d{1}:\\d{12}:function:[a-zA-Z0-9-_]+(:(\\$LATEST|[a-zA-Z0-9-_]+))?$")
        }

        private enum CodingKeys: String, CodingKey {
            case lambdaArn = "LambdaArn"
        }
    }

    public struct SipMediaApplicationLoggingConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Enables message logging for the specified SIP media application.
        public let enableSipMediaApplicationMessageLogs: Bool?

        @inlinable
        public init(enableSipMediaApplicationMessageLogs: Bool? = nil) {
            self.enableSipMediaApplicationMessageLogs = enableSipMediaApplicationMessageLogs
        }

        private enum CodingKeys: String, CodingKey {
            case enableSipMediaApplicationMessageLogs = "EnableSipMediaApplicationMessageLogs"
        }
    }

    public struct SipRule: AWSDecodableShape {
        /// The time at which the SIP rule was created, in ISO 8601 format.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var createdTimestamp: Date?
        /// Indicates whether the SIP rule is enabled or disabled. You must disable a rule before you can delete it.
        public let disabled: Bool?
        /// A SIP rule's name.
        public let name: String?
        /// A SIP rule's ID.
        public let sipRuleId: String?
        /// The target SIP media application and other details, such as priority and AWS Region,  to be specified in the SIP rule. Only one SIP rule per AWS Region can be provided.
        public let targetApplications: [SipRuleTargetApplication]?
        /// The type of trigger set for a SIP rule, either a phone number or a URI request host name.
        public let triggerType: SipRuleTriggerType?
        /// The value set for a SIP rule's trigger type. Either a phone number or a URI hostname.
        public let triggerValue: String?
        /// The time at which the SIP rule was updated, in ISO 8601 format.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var updatedTimestamp: Date?

        @inlinable
        public init(createdTimestamp: Date? = nil, disabled: Bool? = nil, name: String? = nil, sipRuleId: String? = nil, targetApplications: [SipRuleTargetApplication]? = nil, triggerType: SipRuleTriggerType? = nil, triggerValue: String? = nil, updatedTimestamp: Date? = nil) {
            self.createdTimestamp = createdTimestamp
            self.disabled = disabled
            self.name = name
            self.sipRuleId = sipRuleId
            self.targetApplications = targetApplications
            self.triggerType = triggerType
            self.triggerValue = triggerValue
            self.updatedTimestamp = updatedTimestamp
        }

        private enum CodingKeys: String, CodingKey {
            case createdTimestamp = "CreatedTimestamp"
            case disabled = "Disabled"
            case name = "Name"
            case sipRuleId = "SipRuleId"
            case targetApplications = "TargetApplications"
            case triggerType = "TriggerType"
            case triggerValue = "TriggerValue"
            case updatedTimestamp = "UpdatedTimestamp"
        }
    }

    public struct SipRuleTargetApplication: AWSEncodableShape & AWSDecodableShape {
        /// The AWS Region of a rule's target SIP media application.
        public let awsRegion: String?
        /// The priority setting of a rule's target SIP media application.
        public let priority: Int?
        /// The ID of a rule's target SIP media application.
        public let sipMediaApplicationId: String?

        @inlinable
        public init(awsRegion: String? = nil, priority: Int? = nil, sipMediaApplicationId: String? = nil) {
            self.awsRegion = awsRegion
            self.priority = priority
            self.sipMediaApplicationId = sipMediaApplicationId
        }

        public func validate(name: String) throws {
            try self.validate(self.priority, name: "priority", parent: name, min: 1)
            try self.validate(self.sipMediaApplicationId, name: "sipMediaApplicationId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case awsRegion = "AwsRegion"
            case priority = "Priority"
            case sipMediaApplicationId = "SipMediaApplicationId"
        }
    }

    public struct SpeakerSearchDetails: AWSDecodableShape {
        /// The result value in the speaker search details.
        public let results: [SpeakerSearchResult]?
        /// The status of a voice print generation operation, VoiceprintGenerationSuccess or VoiceprintGenerationFailure..
        public let voiceprintGenerationStatus: String?

        @inlinable
        public init(results: [SpeakerSearchResult]? = nil, voiceprintGenerationStatus: String? = nil) {
            self.results = results
            self.voiceprintGenerationStatus = voiceprintGenerationStatus
        }

        private enum CodingKeys: String, CodingKey {
            case results = "Results"
            case voiceprintGenerationStatus = "VoiceprintGenerationStatus"
        }
    }

    public struct SpeakerSearchResult: AWSDecodableShape {
        /// The confidence score in the speaker search analysis.
        public let confidenceScore: Float?
        /// The voice profile ID.
        public let voiceProfileId: String?

        @inlinable
        public init(confidenceScore: Float? = nil, voiceProfileId: String? = nil) {
            self.confidenceScore = confidenceScore
            self.voiceProfileId = voiceProfileId
        }

        private enum CodingKeys: String, CodingKey {
            case confidenceScore = "ConfidenceScore"
            case voiceProfileId = "VoiceProfileId"
        }
    }

    public struct SpeakerSearchTask: AWSDecodableShape {
        /// The call details of a speaker search task.
        public let callDetails: CallDetails?
        /// The time at which a speaker search task was created.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var createdTimestamp: Date?
        /// The details of a speaker search task.
        public let speakerSearchDetails: SpeakerSearchDetails?
        /// The speaker search task ID.
        public let speakerSearchTaskId: String?
        /// The status of the speaker search task, IN_QUEUE, IN_PROGRESS, PARTIAL_SUCCESS, SUCCEEDED,  FAILED, or STOPPED.
        public let speakerSearchTaskStatus: String?
        /// The time at which the speaker search task began.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var startedTimestamp: Date?
        /// A detailed message about the status of a speaker search.
        public let statusMessage: String?
        /// The time at which a speaker search task was updated.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var updatedTimestamp: Date?

        @inlinable
        public init(callDetails: CallDetails? = nil, createdTimestamp: Date? = nil, speakerSearchDetails: SpeakerSearchDetails? = nil, speakerSearchTaskId: String? = nil, speakerSearchTaskStatus: String? = nil, startedTimestamp: Date? = nil, statusMessage: String? = nil, updatedTimestamp: Date? = nil) {
            self.callDetails = callDetails
            self.createdTimestamp = createdTimestamp
            self.speakerSearchDetails = speakerSearchDetails
            self.speakerSearchTaskId = speakerSearchTaskId
            self.speakerSearchTaskStatus = speakerSearchTaskStatus
            self.startedTimestamp = startedTimestamp
            self.statusMessage = statusMessage
            self.updatedTimestamp = updatedTimestamp
        }

        private enum CodingKeys: String, CodingKey {
            case callDetails = "CallDetails"
            case createdTimestamp = "CreatedTimestamp"
            case speakerSearchDetails = "SpeakerSearchDetails"
            case speakerSearchTaskId = "SpeakerSearchTaskId"
            case speakerSearchTaskStatus = "SpeakerSearchTaskStatus"
            case startedTimestamp = "StartedTimestamp"
            case statusMessage = "StatusMessage"
            case updatedTimestamp = "UpdatedTimestamp"
        }
    }

    public struct StartSpeakerSearchTaskRequest: AWSEncodableShape {
        /// Specifies which call leg to stream for speaker search.
        public let callLeg: CallLegType?
        /// The unique identifier for the client request. Use a different token for different speaker search tasks.
        public let clientRequestToken: String?
        /// The transaction ID of the call being analyzed.
        public let transactionId: String
        /// The Voice Connector ID.
        public let voiceConnectorId: String
        /// The ID of the voice profile domain that will store the voice profile.
        public let voiceProfileDomainId: String

        @inlinable
        public init(callLeg: CallLegType? = nil, clientRequestToken: String? = nil, transactionId: String, voiceConnectorId: String, voiceProfileDomainId: String) {
            self.callLeg = callLeg
            self.clientRequestToken = clientRequestToken
            self.transactionId = transactionId
            self.voiceConnectorId = voiceConnectorId
            self.voiceProfileDomainId = voiceProfileDomainId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.callLeg, forKey: .callLeg)
            try container.encodeIfPresent(self.clientRequestToken, forKey: .clientRequestToken)
            try container.encode(self.transactionId, forKey: .transactionId)
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
            try container.encode(self.voiceProfileDomainId, forKey: .voiceProfileDomainId)
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[-_a-zA-Z0-9]*${2,64}$")
            try self.validate(self.transactionId, name: "transactionId", parent: name, max: 256)
            try self.validate(self.transactionId, name: "transactionId", parent: name, min: 1)
            try self.validate(self.transactionId, name: "transactionId", parent: name, pattern: "\\S")
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, max: 128)
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, min: 1)
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
            try self.validate(self.voiceProfileDomainId, name: "voiceProfileDomainId", parent: name, max: 256)
            try self.validate(self.voiceProfileDomainId, name: "voiceProfileDomainId", parent: name, min: 1)
            try self.validate(self.voiceProfileDomainId, name: "voiceProfileDomainId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case callLeg = "CallLeg"
            case clientRequestToken = "ClientRequestToken"
            case transactionId = "TransactionId"
            case voiceProfileDomainId = "VoiceProfileDomainId"
        }
    }

    public struct StartSpeakerSearchTaskResponse: AWSDecodableShape {
        /// The details of the speaker search task.
        public let speakerSearchTask: SpeakerSearchTask?

        @inlinable
        public init(speakerSearchTask: SpeakerSearchTask? = nil) {
            self.speakerSearchTask = speakerSearchTask
        }

        private enum CodingKeys: String, CodingKey {
            case speakerSearchTask = "SpeakerSearchTask"
        }
    }

    public struct StartVoiceToneAnalysisTaskRequest: AWSEncodableShape {
        /// The unique identifier for the client request. Use a different token for different voice tone analysis  tasks.
        public let clientRequestToken: String?
        /// The language code.
        public let languageCode: LanguageCode
        /// The transaction ID.
        public let transactionId: String
        /// The Voice Connector ID.
        public let voiceConnectorId: String

        @inlinable
        public init(clientRequestToken: String? = nil, languageCode: LanguageCode, transactionId: String, voiceConnectorId: String) {
            self.clientRequestToken = clientRequestToken
            self.languageCode = languageCode
            self.transactionId = transactionId
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.clientRequestToken, forKey: .clientRequestToken)
            try container.encode(self.languageCode, forKey: .languageCode)
            try container.encode(self.transactionId, forKey: .transactionId)
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[-_a-zA-Z0-9]*${2,64}$")
            try self.validate(self.transactionId, name: "transactionId", parent: name, max: 256)
            try self.validate(self.transactionId, name: "transactionId", parent: name, min: 1)
            try self.validate(self.transactionId, name: "transactionId", parent: name, pattern: "\\S")
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, max: 128)
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, min: 1)
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken = "ClientRequestToken"
            case languageCode = "LanguageCode"
            case transactionId = "TransactionId"
        }
    }

    public struct StartVoiceToneAnalysisTaskResponse: AWSDecodableShape {
        /// The details of the voice tone analysis task.
        public let voiceToneAnalysisTask: VoiceToneAnalysisTask?

        @inlinable
        public init(voiceToneAnalysisTask: VoiceToneAnalysisTask? = nil) {
            self.voiceToneAnalysisTask = voiceToneAnalysisTask
        }

        private enum CodingKeys: String, CodingKey {
            case voiceToneAnalysisTask = "VoiceToneAnalysisTask"
        }
    }

    public struct StopSpeakerSearchTaskRequest: AWSEncodableShape {
        /// The speaker search task ID.
        public let speakerSearchTaskId: String
        /// The Voice Connector ID.
        public let voiceConnectorId: String

        @inlinable
        public init(speakerSearchTaskId: String, voiceConnectorId: String) {
            self.speakerSearchTaskId = speakerSearchTaskId
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.speakerSearchTaskId, key: "SpeakerSearchTaskId")
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.validate(self.speakerSearchTaskId, name: "speakerSearchTaskId", parent: name, max: 256)
            try self.validate(self.speakerSearchTaskId, name: "speakerSearchTaskId", parent: name, min: 1)
            try self.validate(self.speakerSearchTaskId, name: "speakerSearchTaskId", parent: name, pattern: "\\S")
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, max: 128)
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, min: 1)
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct StopVoiceToneAnalysisTaskRequest: AWSEncodableShape {
        /// The Voice Connector ID.
        public let voiceConnectorId: String
        /// The ID of the voice tone analysis task.
        public let voiceToneAnalysisTaskId: String

        @inlinable
        public init(voiceConnectorId: String, voiceToneAnalysisTaskId: String) {
            self.voiceConnectorId = voiceConnectorId
            self.voiceToneAnalysisTaskId = voiceToneAnalysisTaskId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            _ = encoder.container(keyedBy: CodingKeys.self)
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
            request.encodePath(self.voiceToneAnalysisTaskId, key: "VoiceToneAnalysisTaskId")
        }

        public func validate(name: String) throws {
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, max: 128)
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, min: 1)
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
            try self.validate(self.voiceToneAnalysisTaskId, name: "voiceToneAnalysisTaskId", parent: name, max: 256)
            try self.validate(self.voiceToneAnalysisTaskId, name: "voiceToneAnalysisTaskId", parent: name, min: 1)
            try self.validate(self.voiceToneAnalysisTaskId, name: "voiceToneAnalysisTaskId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct StreamingConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The amount of time, in hours, to the Kinesis data.
        public let dataRetentionInHours: Int
        /// When true, streaming to Kinesis is off.
        public let disabled: Bool
        /// The call analytics configuration.
        public let mediaInsightsConfiguration: MediaInsightsConfiguration?
        /// The streaming notification targets.
        public let streamingNotificationTargets: [StreamingNotificationTarget]?

        @inlinable
        public init(dataRetentionInHours: Int, disabled: Bool, mediaInsightsConfiguration: MediaInsightsConfiguration? = nil, streamingNotificationTargets: [StreamingNotificationTarget]? = nil) {
            self.dataRetentionInHours = dataRetentionInHours
            self.disabled = disabled
            self.mediaInsightsConfiguration = mediaInsightsConfiguration
            self.streamingNotificationTargets = streamingNotificationTargets
        }

        public func validate(name: String) throws {
            try self.validate(self.dataRetentionInHours, name: "dataRetentionInHours", parent: name, min: 0)
            try self.mediaInsightsConfiguration?.validate(name: "\(name).mediaInsightsConfiguration")
            try self.validate(self.streamingNotificationTargets, name: "streamingNotificationTargets", parent: name, max: 3)
            try self.validate(self.streamingNotificationTargets, name: "streamingNotificationTargets", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case dataRetentionInHours = "DataRetentionInHours"
            case disabled = "Disabled"
            case mediaInsightsConfiguration = "MediaInsightsConfiguration"
            case streamingNotificationTargets = "StreamingNotificationTargets"
        }
    }

    public struct StreamingNotificationTarget: AWSEncodableShape & AWSDecodableShape {
        /// The streaming notification target.
        public let notificationTarget: NotificationTarget?

        @inlinable
        public init(notificationTarget: NotificationTarget? = nil) {
            self.notificationTarget = notificationTarget
        }

        private enum CodingKeys: String, CodingKey {
            case notificationTarget = "NotificationTarget"
        }
    }

    public struct Tag: AWSEncodableShape & AWSDecodableShape {
        /// The tag's key.
        public let key: String
        /// The tag's value.
        public let value: String

        @inlinable
        public init(key: String, value: String) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 128)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.value, name: "value", parent: name, max: 256)
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case value = "Value"
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        /// The ARN of the resource being tagged.
        public let resourceARN: String
        /// A list of the tags being added to the resource.
        public let tags: [Tag]

        @inlinable
        public init(resourceARN: String, tags: [Tag]) {
            self.resourceARN = resourceARN
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 1024)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 1)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, pattern: "^arn[\\/\\:\\-\\_\\.a-zA-Z0-9]+$")
            try self.tags.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
            case tags = "Tags"
        }
    }

    public struct Termination: AWSEncodableShape & AWSDecodableShape {
        /// The countries to which calls are allowed, in ISO 3166-1 alpha-2 format. Required.
        public let callingRegions: [String]?
        /// The IP addresses allowed to make calls, in CIDR format.
        public let cidrAllowedList: [String]?
        /// The limit on calls per second. Max value based on account service quota. Default value of 1.
        public let cpsLimit: Int?
        /// The default outbound calling number.
        public let defaultPhoneNumber: String?
        /// When termination is disabled, outbound calls cannot be made.
        public let disabled: Bool?

        @inlinable
        public init(callingRegions: [String]? = nil, cidrAllowedList: [String]? = nil, cpsLimit: Int? = nil, defaultPhoneNumber: String? = nil, disabled: Bool? = nil) {
            self.callingRegions = callingRegions
            self.cidrAllowedList = cidrAllowedList
            self.cpsLimit = cpsLimit
            self.defaultPhoneNumber = defaultPhoneNumber
            self.disabled = disabled
        }

        public func validate(name: String) throws {
            try self.validate(self.cpsLimit, name: "cpsLimit", parent: name, min: 1)
            try self.validate(self.defaultPhoneNumber, name: "defaultPhoneNumber", parent: name, pattern: "^\\+?[1-9]\\d{1,14}$")
        }

        private enum CodingKeys: String, CodingKey {
            case callingRegions = "CallingRegions"
            case cidrAllowedList = "CidrAllowedList"
            case cpsLimit = "CpsLimit"
            case defaultPhoneNumber = "DefaultPhoneNumber"
            case disabled = "Disabled"
        }
    }

    public struct TerminationHealth: AWSDecodableShape {
        /// The source IP address.
        public let source: String?
        /// The timestamp, in ISO 8601 format.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var timestamp: Date?

        @inlinable
        public init(source: String? = nil, timestamp: Date? = nil) {
            self.source = source
            self.timestamp = timestamp
        }

        private enum CodingKeys: String, CodingKey {
            case source = "Source"
            case timestamp = "Timestamp"
        }
    }

    public struct ThrottledClientException: AWSErrorShape {
        public let code: ErrorCode?
        public let message: String?

        @inlinable
        public init(code: ErrorCode? = nil, message: String? = nil) {
            self.code = code
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case code = "Code"
            case message = "Message"
        }
    }

    public struct UnauthorizedClientException: AWSErrorShape {
        public let code: ErrorCode?
        public let message: String?

        @inlinable
        public init(code: ErrorCode? = nil, message: String? = nil) {
            self.code = code
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case code = "Code"
            case message = "Message"
        }
    }

    public struct UnprocessableEntityException: AWSErrorShape {
        public let code: ErrorCode?
        public let message: String?

        @inlinable
        public init(code: ErrorCode? = nil, message: String? = nil) {
            self.code = code
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case code = "Code"
            case message = "Message"
        }
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        /// The ARN of the resource having its tags removed.
        public let resourceARN: String
        /// The keys of the tags being removed from the resource.
        public let tagKeys: [String]

        @inlinable
        public init(resourceARN: String, tagKeys: [String]) {
            self.resourceARN = resourceARN
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, max: 1024)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, min: 1)
            try self.validate(self.resourceARN, name: "resourceARN", parent: name, pattern: "^arn[\\/\\:\\-\\_\\.a-zA-Z0-9]+$")
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
            }
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, max: 50)
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case resourceARN = "ResourceARN"
            case tagKeys = "TagKeys"
        }
    }

    public struct UpdateGlobalSettingsRequest: AWSEncodableShape {
        /// The Voice Connector settings.
        public let voiceConnector: VoiceConnectorSettings?

        @inlinable
        public init(voiceConnector: VoiceConnectorSettings? = nil) {
            self.voiceConnector = voiceConnector
        }

        private enum CodingKeys: String, CodingKey {
            case voiceConnector = "VoiceConnector"
        }
    }

    public struct UpdatePhoneNumberRequest: AWSEncodableShape {
        /// The outbound calling name associated with the phone number.
        public let callingName: String?
        /// Specifies the updated name assigned to one or more phone numbers.
        public let name: String?
        /// The phone number ID.
        public let phoneNumberId: String
        /// The product type.
        public let productType: PhoneNumberProductType?

        @inlinable
        public init(callingName: String? = nil, name: String? = nil, phoneNumberId: String, productType: PhoneNumberProductType? = nil) {
            self.callingName = callingName
            self.name = name
            self.phoneNumberId = phoneNumberId
            self.productType = productType
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.callingName, forKey: .callingName)
            try container.encodeIfPresent(self.name, forKey: .name)
            request.encodePath(self.phoneNumberId, key: "PhoneNumberId")
            try container.encodeIfPresent(self.productType, forKey: .productType)
        }

        public func validate(name: String) throws {
            try self.validate(self.callingName, name: "callingName", parent: name, pattern: "^$|^[a-zA-Z0-9 ]{2,15}$")
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, pattern: "^$|^[a-zA-Z0-9\\,\\.\\_\\-]+(\\s+[a-zA-Z0-9\\,\\.\\_\\-]+)*$")
            try self.validate(self.phoneNumberId, name: "phoneNumberId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case callingName = "CallingName"
            case name = "Name"
            case productType = "ProductType"
        }
    }

    public struct UpdatePhoneNumberRequestItem: AWSEncodableShape {
        /// The outbound calling name to update.
        public let callingName: String?
        /// The name of the phone number.
        public let name: String?
        /// The phone number ID to update.
        public let phoneNumberId: String
        /// The product type to update.
        public let productType: PhoneNumberProductType?

        @inlinable
        public init(callingName: String? = nil, name: String? = nil, phoneNumberId: String, productType: PhoneNumberProductType? = nil) {
            self.callingName = callingName
            self.name = name
            self.phoneNumberId = phoneNumberId
            self.productType = productType
        }

        public func validate(name: String) throws {
            try self.validate(self.callingName, name: "callingName", parent: name, pattern: "^$|^[a-zA-Z0-9 ]{2,15}$")
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, pattern: "^$|^[a-zA-Z0-9\\,\\.\\_\\-]+(\\s+[a-zA-Z0-9\\,\\.\\_\\-]+)*$")
            try self.validate(self.phoneNumberId, name: "phoneNumberId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case callingName = "CallingName"
            case name = "Name"
            case phoneNumberId = "PhoneNumberId"
            case productType = "ProductType"
        }
    }

    public struct UpdatePhoneNumberResponse: AWSDecodableShape {
        /// The updated phone number details.
        public let phoneNumber: PhoneNumber?

        @inlinable
        public init(phoneNumber: PhoneNumber? = nil) {
            self.phoneNumber = phoneNumber
        }

        private enum CodingKeys: String, CodingKey {
            case phoneNumber = "PhoneNumber"
        }
    }

    public struct UpdatePhoneNumberSettingsRequest: AWSEncodableShape {
        /// The default outbound calling name for the account.
        public let callingName: String

        @inlinable
        public init(callingName: String) {
            self.callingName = callingName
        }

        public func validate(name: String) throws {
            try self.validate(self.callingName, name: "callingName", parent: name, pattern: "^$|^[a-zA-Z0-9 ]{2,15}$")
        }

        private enum CodingKeys: String, CodingKey {
            case callingName = "CallingName"
        }
    }

    public struct UpdateProxySessionRequest: AWSEncodableShape {
        /// The proxy session capabilities.
        public let capabilities: [Capability]
        /// The number of minutes allowed for the proxy session.
        public let expiryMinutes: Int?
        /// The proxy session ID.
        public let proxySessionId: String
        /// The Voice Connector ID.
        public let voiceConnectorId: String

        @inlinable
        public init(capabilities: [Capability], expiryMinutes: Int? = nil, proxySessionId: String, voiceConnectorId: String) {
            self.capabilities = capabilities
            self.expiryMinutes = expiryMinutes
            self.proxySessionId = proxySessionId
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encode(self.capabilities, forKey: .capabilities)
            try container.encodeIfPresent(self.expiryMinutes, forKey: .expiryMinutes)
            request.encodePath(self.proxySessionId, key: "ProxySessionId")
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.validate(self.expiryMinutes, name: "expiryMinutes", parent: name, min: 1)
            try self.validate(self.proxySessionId, name: "proxySessionId", parent: name, max: 128)
            try self.validate(self.proxySessionId, name: "proxySessionId", parent: name, min: 1)
            try self.validate(self.proxySessionId, name: "proxySessionId", parent: name, pattern: "\\S")
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, max: 128)
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, min: 1)
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case capabilities = "Capabilities"
            case expiryMinutes = "ExpiryMinutes"
        }
    }

    public struct UpdateProxySessionResponse: AWSDecodableShape {
        /// The updated proxy session details.
        public let proxySession: ProxySession?

        @inlinable
        public init(proxySession: ProxySession? = nil) {
            self.proxySession = proxySession
        }

        private enum CodingKeys: String, CodingKey {
            case proxySession = "ProxySession"
        }
    }

    public struct UpdateSipMediaApplicationCallRequest: AWSEncodableShape {
        /// Arguments made available to the Lambda function as part of the  CALL_UPDATE_REQUESTED event. Can contain 0-20 key-value pairs.
        public let arguments: [String: String]
        /// The ID of the SIP media application handling the call.
        public let sipMediaApplicationId: String
        /// The ID of the call transaction.
        public let transactionId: String

        @inlinable
        public init(arguments: [String: String], sipMediaApplicationId: String, transactionId: String) {
            self.arguments = arguments
            self.sipMediaApplicationId = sipMediaApplicationId
            self.transactionId = transactionId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encode(self.arguments, forKey: .arguments)
            request.encodePath(self.sipMediaApplicationId, key: "SipMediaApplicationId")
            request.encodePath(self.transactionId, key: "TransactionId")
        }

        public func validate(name: String) throws {
            try self.validate(self.arguments, name: "arguments", parent: name, max: 20)
            try self.validate(self.sipMediaApplicationId, name: "sipMediaApplicationId", parent: name, pattern: "\\S")
            try self.validate(self.transactionId, name: "transactionId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case arguments = "Arguments"
        }
    }

    public struct UpdateSipMediaApplicationCallResponse: AWSDecodableShape {
        /// A Call instance for a SIP media application.
        public let sipMediaApplicationCall: SipMediaApplicationCall?

        @inlinable
        public init(sipMediaApplicationCall: SipMediaApplicationCall? = nil) {
            self.sipMediaApplicationCall = sipMediaApplicationCall
        }

        private enum CodingKeys: String, CodingKey {
            case sipMediaApplicationCall = "SipMediaApplicationCall"
        }
    }

    public struct UpdateSipMediaApplicationRequest: AWSEncodableShape {
        /// The new set of endpoints for the specified SIP media application.
        public let endpoints: [SipMediaApplicationEndpoint]?
        /// The new name for the specified SIP media application.
        public let name: String?
        /// The SIP media application ID.
        public let sipMediaApplicationId: String

        @inlinable
        public init(endpoints: [SipMediaApplicationEndpoint]? = nil, name: String? = nil, sipMediaApplicationId: String) {
            self.endpoints = endpoints
            self.name = name
            self.sipMediaApplicationId = sipMediaApplicationId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.endpoints, forKey: .endpoints)
            try container.encodeIfPresent(self.name, forKey: .name)
            request.encodePath(self.sipMediaApplicationId, key: "SipMediaApplicationId")
        }

        public func validate(name: String) throws {
            try self.endpoints?.forEach {
                try $0.validate(name: "\(name).endpoints[]")
            }
            try self.validate(self.endpoints, name: "endpoints", parent: name, max: 1)
            try self.validate(self.endpoints, name: "endpoints", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9 _.-]+$")
            try self.validate(self.sipMediaApplicationId, name: "sipMediaApplicationId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case endpoints = "Endpoints"
            case name = "Name"
        }
    }

    public struct UpdateSipMediaApplicationResponse: AWSDecodableShape {
        /// The updated SIP media application’s details.
        public let sipMediaApplication: SipMediaApplication?

        @inlinable
        public init(sipMediaApplication: SipMediaApplication? = nil) {
            self.sipMediaApplication = sipMediaApplication
        }

        private enum CodingKeys: String, CodingKey {
            case sipMediaApplication = "SipMediaApplication"
        }
    }

    public struct UpdateSipRuleRequest: AWSEncodableShape {
        /// The new value that indicates whether the rule is disabled.
        public let disabled: Bool?
        /// The new name for the specified SIP rule.
        public let name: String
        /// The SIP rule ID.
        public let sipRuleId: String
        /// The new list of target applications.
        public let targetApplications: [SipRuleTargetApplication]?

        @inlinable
        public init(disabled: Bool? = nil, name: String, sipRuleId: String, targetApplications: [SipRuleTargetApplication]? = nil) {
            self.disabled = disabled
            self.name = name
            self.sipRuleId = sipRuleId
            self.targetApplications = targetApplications
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.disabled, forKey: .disabled)
            try container.encode(self.name, forKey: .name)
            request.encodePath(self.sipRuleId, key: "SipRuleId")
            try container.encodeIfPresent(self.targetApplications, forKey: .targetApplications)
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9 _.-]+$")
            try self.validate(self.sipRuleId, name: "sipRuleId", parent: name, pattern: "\\S")
            try self.targetApplications?.forEach {
                try $0.validate(name: "\(name).targetApplications[]")
            }
            try self.validate(self.targetApplications, name: "targetApplications", parent: name, max: 25)
            try self.validate(self.targetApplications, name: "targetApplications", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case disabled = "Disabled"
            case name = "Name"
            case targetApplications = "TargetApplications"
        }
    }

    public struct UpdateSipRuleResponse: AWSDecodableShape {
        /// The updated SIP rule details.
        public let sipRule: SipRule?

        @inlinable
        public init(sipRule: SipRule? = nil) {
            self.sipRule = sipRule
        }

        private enum CodingKeys: String, CodingKey {
            case sipRule = "SipRule"
        }
    }

    public struct UpdateVoiceConnectorGroupRequest: AWSEncodableShape {
        /// The name of the Voice Connector group.
        public let name: String
        /// The Voice Connector ID.
        public let voiceConnectorGroupId: String
        /// The VoiceConnectorItems to associate with the Voice Connector  group.
        public let voiceConnectorItems: [VoiceConnectorItem]

        @inlinable
        public init(name: String, voiceConnectorGroupId: String, voiceConnectorItems: [VoiceConnectorItem]) {
            self.name = name
            self.voiceConnectorGroupId = voiceConnectorGroupId
            self.voiceConnectorItems = voiceConnectorItems
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encode(self.name, forKey: .name)
            request.encodePath(self.voiceConnectorGroupId, key: "VoiceConnectorGroupId")
            try container.encode(self.voiceConnectorItems, forKey: .voiceConnectorItems)
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9 _.-]+$")
            try self.validate(self.voiceConnectorGroupId, name: "voiceConnectorGroupId", parent: name, pattern: "\\S")
            try self.voiceConnectorItems.forEach {
                try $0.validate(name: "\(name).voiceConnectorItems[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case voiceConnectorItems = "VoiceConnectorItems"
        }
    }

    public struct UpdateVoiceConnectorGroupResponse: AWSDecodableShape {
        /// The updated Voice Connector group.
        public let voiceConnectorGroup: VoiceConnectorGroup?

        @inlinable
        public init(voiceConnectorGroup: VoiceConnectorGroup? = nil) {
            self.voiceConnectorGroup = voiceConnectorGroup
        }

        private enum CodingKeys: String, CodingKey {
            case voiceConnectorGroup = "VoiceConnectorGroup"
        }
    }

    public struct UpdateVoiceConnectorRequest: AWSEncodableShape {
        /// The name of the Voice Connector.
        public let name: String
        /// When enabled, requires encryption for the Voice Connector.
        public let requireEncryption: Bool
        /// The Voice Connector ID.
        public let voiceConnectorId: String

        @inlinable
        public init(name: String, requireEncryption: Bool, voiceConnectorId: String) {
            self.name = name
            self.requireEncryption = requireEncryption
            self.voiceConnectorId = voiceConnectorId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encode(self.name, forKey: .name)
            try container.encode(self.requireEncryption, forKey: .requireEncryption)
            request.encodePath(self.voiceConnectorId, key: "VoiceConnectorId")
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9 _.-]+$")
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case requireEncryption = "RequireEncryption"
        }
    }

    public struct UpdateVoiceConnectorResponse: AWSDecodableShape {
        /// The updated Voice Connector details.
        public let voiceConnector: VoiceConnector?

        @inlinable
        public init(voiceConnector: VoiceConnector? = nil) {
            self.voiceConnector = voiceConnector
        }

        private enum CodingKeys: String, CodingKey {
            case voiceConnector = "VoiceConnector"
        }
    }

    public struct UpdateVoiceProfileDomainRequest: AWSEncodableShape {
        /// The description of the voice profile domain.
        public let description: String?
        /// The name of the voice profile domain.
        public let name: String?
        /// The domain ID.
        public let voiceProfileDomainId: String

        @inlinable
        public init(description: String? = nil, name: String? = nil, voiceProfileDomainId: String) {
            self.description = description
            self.name = name
            self.voiceProfileDomainId = voiceProfileDomainId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encodeIfPresent(self.description, forKey: .description)
            try container.encodeIfPresent(self.name, forKey: .name)
            request.encodePath(self.voiceProfileDomainId, key: "VoiceProfileDomainId")
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 1024)
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9 _.-]+$")
            try self.validate(self.voiceProfileDomainId, name: "voiceProfileDomainId", parent: name, max: 256)
            try self.validate(self.voiceProfileDomainId, name: "voiceProfileDomainId", parent: name, min: 1)
            try self.validate(self.voiceProfileDomainId, name: "voiceProfileDomainId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case description = "Description"
            case name = "Name"
        }
    }

    public struct UpdateVoiceProfileDomainResponse: AWSDecodableShape {
        /// The updated details of the voice profile domain.
        public let voiceProfileDomain: VoiceProfileDomain?

        @inlinable
        public init(voiceProfileDomain: VoiceProfileDomain? = nil) {
            self.voiceProfileDomain = voiceProfileDomain
        }

        private enum CodingKeys: String, CodingKey {
            case voiceProfileDomain = "VoiceProfileDomain"
        }
    }

    public struct UpdateVoiceProfileRequest: AWSEncodableShape {
        /// The ID of the speaker search task.
        public let speakerSearchTaskId: String
        /// The profile ID.
        public let voiceProfileId: String

        @inlinable
        public init(speakerSearchTaskId: String, voiceProfileId: String) {
            self.speakerSearchTaskId = speakerSearchTaskId
            self.voiceProfileId = voiceProfileId
        }

        public func encode(to encoder: Encoder) throws {
            let request = encoder.userInfo[.awsRequest]! as! RequestEncodingContainer
            var container = encoder.container(keyedBy: CodingKeys.self)
            try container.encode(self.speakerSearchTaskId, forKey: .speakerSearchTaskId)
            request.encodePath(self.voiceProfileId, key: "VoiceProfileId")
        }

        public func validate(name: String) throws {
            try self.validate(self.speakerSearchTaskId, name: "speakerSearchTaskId", parent: name, max: 256)
            try self.validate(self.speakerSearchTaskId, name: "speakerSearchTaskId", parent: name, min: 1)
            try self.validate(self.speakerSearchTaskId, name: "speakerSearchTaskId", parent: name, pattern: "\\S")
            try self.validate(self.voiceProfileId, name: "voiceProfileId", parent: name, max: 256)
            try self.validate(self.voiceProfileId, name: "voiceProfileId", parent: name, min: 1)
            try self.validate(self.voiceProfileId, name: "voiceProfileId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case speakerSearchTaskId = "SpeakerSearchTaskId"
        }
    }

    public struct UpdateVoiceProfileResponse: AWSDecodableShape {
        /// The updated voice profile settings.
        public let voiceProfile: VoiceProfile?

        @inlinable
        public init(voiceProfile: VoiceProfile? = nil) {
            self.voiceProfile = voiceProfile
        }

        private enum CodingKeys: String, CodingKey {
            case voiceProfile = "VoiceProfile"
        }
    }

    public struct ValidateE911AddressRequest: AWSEncodableShape {
        /// The AWS account ID.
        public let awsAccountId: String
        /// The address city, such as Portland.
        public let city: String
        /// The country in the address being validated as two-letter country code in ISO 3166-1 alpha-2 format, such as US. For more information, see ISO 3166-1 alpha-2 in Wikipedia.
        public let country: String
        /// The dress postal code, such 04352.
        public let postalCode: String
        /// The address state, such as ME.
        public let state: String
        /// The address street information, such as 8th Avenue.
        public let streetInfo: String
        /// The address street number, such as 200 or 2121.
        public let streetNumber: String

        @inlinable
        public init(awsAccountId: String, city: String, country: String, postalCode: String, state: String, streetInfo: String, streetNumber: String) {
            self.awsAccountId = awsAccountId
            self.city = city
            self.country = country
            self.postalCode = postalCode
            self.state = state
            self.streetInfo = streetInfo
            self.streetNumber = streetNumber
        }

        public func validate(name: String) throws {
            try self.validate(self.awsAccountId, name: "awsAccountId", parent: name, pattern: "\\S")
            try self.validate(self.city, name: "city", parent: name, pattern: "\\S")
            try self.validate(self.country, name: "country", parent: name, pattern: "\\S")
            try self.validate(self.postalCode, name: "postalCode", parent: name, pattern: "\\S")
            try self.validate(self.state, name: "state", parent: name, pattern: "\\S")
            try self.validate(self.streetInfo, name: "streetInfo", parent: name, pattern: "\\S")
            try self.validate(self.streetNumber, name: "streetNumber", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case awsAccountId = "AwsAccountId"
            case city = "City"
            case country = "Country"
            case postalCode = "PostalCode"
            case state = "State"
            case streetInfo = "StreetInfo"
            case streetNumber = "StreetNumber"
        }
    }

    public struct ValidateE911AddressResponse: AWSDecodableShape {
        /// The validated address.
        public let address: Address?
        /// The ID that represents the address.
        public let addressExternalId: String?
        /// The list of address suggestions..
        public let candidateAddressList: [CandidateAddress]?
        /// Number indicating the result of address validation. Each possible result is defined as follows:    0 - Address validation succeeded.    1 - Address validation succeeded. The address was a close enough match and has been corrected as part of the address object.    2 - Address validation failed. You should re-submit the validation request with candidates from the CandidateAddressList result, if it's a close match.
        public let validationResult: Int?

        @inlinable
        public init(address: Address? = nil, addressExternalId: String? = nil, candidateAddressList: [CandidateAddress]? = nil, validationResult: Int? = nil) {
            self.address = address
            self.addressExternalId = addressExternalId
            self.candidateAddressList = candidateAddressList
            self.validationResult = validationResult
        }

        private enum CodingKeys: String, CodingKey {
            case address = "Address"
            case addressExternalId = "AddressExternalId"
            case candidateAddressList = "CandidateAddressList"
            case validationResult = "ValidationResult"
        }
    }

    public struct VoiceConnector: AWSDecodableShape {
        /// The AWS Region in which the Voice Connector is created.  Default: us-east-1.
        public let awsRegion: VoiceConnectorAwsRegion?
        /// The Voice Connector's creation timestamp, in ISO 8601 format.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var createdTimestamp: Date?
        /// The connectors for use with Amazon Connect.
        public let integrationType: VoiceConnectorIntegrationType?
        /// The Voice Connector's name.
        public let name: String?
        /// The outbound host name for the Voice Connector.
        public let outboundHostName: String?
        /// Enables or disables encryption for the Voice Connector.
        public let requireEncryption: Bool?
        /// The Voice Connector's updated timestamp, in ISO 8601 format.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var updatedTimestamp: Date?
        /// The ARN of the Voice Connector.
        public let voiceConnectorArn: String?
        /// The Voice Connector's ID.
        public let voiceConnectorId: String?

        @inlinable
        public init(awsRegion: VoiceConnectorAwsRegion? = nil, createdTimestamp: Date? = nil, integrationType: VoiceConnectorIntegrationType? = nil, name: String? = nil, outboundHostName: String? = nil, requireEncryption: Bool? = nil, updatedTimestamp: Date? = nil, voiceConnectorArn: String? = nil, voiceConnectorId: String? = nil) {
            self.awsRegion = awsRegion
            self.createdTimestamp = createdTimestamp
            self.integrationType = integrationType
            self.name = name
            self.outboundHostName = outboundHostName
            self.requireEncryption = requireEncryption
            self.updatedTimestamp = updatedTimestamp
            self.voiceConnectorArn = voiceConnectorArn
            self.voiceConnectorId = voiceConnectorId
        }

        private enum CodingKeys: String, CodingKey {
            case awsRegion = "AwsRegion"
            case createdTimestamp = "CreatedTimestamp"
            case integrationType = "IntegrationType"
            case name = "Name"
            case outboundHostName = "OutboundHostName"
            case requireEncryption = "RequireEncryption"
            case updatedTimestamp = "UpdatedTimestamp"
            case voiceConnectorArn = "VoiceConnectorArn"
            case voiceConnectorId = "VoiceConnectorId"
        }
    }

    public struct VoiceConnectorGroup: AWSDecodableShape {
        /// The Voice Connector group's creation time stamp, in ISO 8601 format.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var createdTimestamp: Date?
        /// The name of a Voice Connector group.
        public let name: String?
        /// The Voice Connector group's creation time stamp, in ISO 8601 format.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var updatedTimestamp: Date?
        /// The ARN of the Voice Connector group.
        public let voiceConnectorGroupArn: String?
        /// The ID of a Voice Connector group.
        public let voiceConnectorGroupId: String?
        /// The Voice Connectors to which you route inbound calls.
        public let voiceConnectorItems: [VoiceConnectorItem]?

        @inlinable
        public init(createdTimestamp: Date? = nil, name: String? = nil, updatedTimestamp: Date? = nil, voiceConnectorGroupArn: String? = nil, voiceConnectorGroupId: String? = nil, voiceConnectorItems: [VoiceConnectorItem]? = nil) {
            self.createdTimestamp = createdTimestamp
            self.name = name
            self.updatedTimestamp = updatedTimestamp
            self.voiceConnectorGroupArn = voiceConnectorGroupArn
            self.voiceConnectorGroupId = voiceConnectorGroupId
            self.voiceConnectorItems = voiceConnectorItems
        }

        private enum CodingKeys: String, CodingKey {
            case createdTimestamp = "CreatedTimestamp"
            case name = "Name"
            case updatedTimestamp = "UpdatedTimestamp"
            case voiceConnectorGroupArn = "VoiceConnectorGroupArn"
            case voiceConnectorGroupId = "VoiceConnectorGroupId"
            case voiceConnectorItems = "VoiceConnectorItems"
        }
    }

    public struct VoiceConnectorItem: AWSEncodableShape & AWSDecodableShape {
        /// The priority setting of a Voice Connector item. Calls are routed to hosts  in priority order, with 1 as the highest priority. When hosts have equal priority,  the system distributes calls among them based on their relative weight.
        public let priority: Int
        /// The Voice Connector ID.
        public let voiceConnectorId: String

        @inlinable
        public init(priority: Int, voiceConnectorId: String) {
            self.priority = priority
            self.voiceConnectorId = voiceConnectorId
        }

        public func validate(name: String) throws {
            try self.validate(self.priority, name: "priority", parent: name, max: 99)
            try self.validate(self.priority, name: "priority", parent: name, min: 1)
            try self.validate(self.voiceConnectorId, name: "voiceConnectorId", parent: name, pattern: "\\S")
        }

        private enum CodingKeys: String, CodingKey {
            case priority = "Priority"
            case voiceConnectorId = "VoiceConnectorId"
        }
    }

    public struct VoiceConnectorSettings: AWSEncodableShape & AWSDecodableShape {
        /// The S3 bucket that stores the Voice Connector's call detail records.
        public let cdrBucket: String?

        @inlinable
        public init(cdrBucket: String? = nil) {
            self.cdrBucket = cdrBucket
        }

        private enum CodingKeys: String, CodingKey {
            case cdrBucket = "CdrBucket"
        }
    }

    public struct VoiceProfile: AWSDecodableShape {
        /// The time at which the voice profile was created and enrolled.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var createdTimestamp: Date?
        /// The time at which a voice profile expires unless you re-enroll the caller via the  UpdateVoiceProfile API.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var expirationTimestamp: Date?
        /// The time at which the voice profile was last updated.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var updatedTimestamp: Date?
        /// The ARN of the voice profile.
        public let voiceProfileArn: String?
        /// The ID of the domain that contains the voice profile.
        public let voiceProfileDomainId: String?
        /// The ID of the voice profile.
        public let voiceProfileId: String?

        @inlinable
        public init(createdTimestamp: Date? = nil, expirationTimestamp: Date? = nil, updatedTimestamp: Date? = nil, voiceProfileArn: String? = nil, voiceProfileDomainId: String? = nil, voiceProfileId: String? = nil) {
            self.createdTimestamp = createdTimestamp
            self.expirationTimestamp = expirationTimestamp
            self.updatedTimestamp = updatedTimestamp
            self.voiceProfileArn = voiceProfileArn
            self.voiceProfileDomainId = voiceProfileDomainId
            self.voiceProfileId = voiceProfileId
        }

        private enum CodingKeys: String, CodingKey {
            case createdTimestamp = "CreatedTimestamp"
            case expirationTimestamp = "ExpirationTimestamp"
            case updatedTimestamp = "UpdatedTimestamp"
            case voiceProfileArn = "VoiceProfileArn"
            case voiceProfileDomainId = "VoiceProfileDomainId"
            case voiceProfileId = "VoiceProfileId"
        }
    }

    public struct VoiceProfileDomain: AWSDecodableShape {
        /// The time at which the voice profile domain was created.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var createdTimestamp: Date?
        /// The description of the voice profile domain.
        public let description: String?
        /// The name of the voice profile domain.
        public let name: String?
        /// A structure that contains the configuration settings for server-side encryption.
        public let serverSideEncryptionConfiguration: ServerSideEncryptionConfiguration?
        /// The time at which the voice profile was last updated.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var updatedTimestamp: Date?
        /// The voice profile domain's Amazon Resource Number (ARN).
        public let voiceProfileDomainArn: String?
        /// The ID of the voice profile domain.
        public let voiceProfileDomainId: String?

        @inlinable
        public init(createdTimestamp: Date? = nil, description: String? = nil, name: String? = nil, serverSideEncryptionConfiguration: ServerSideEncryptionConfiguration? = nil, updatedTimestamp: Date? = nil, voiceProfileDomainArn: String? = nil, voiceProfileDomainId: String? = nil) {
            self.createdTimestamp = createdTimestamp
            self.description = description
            self.name = name
            self.serverSideEncryptionConfiguration = serverSideEncryptionConfiguration
            self.updatedTimestamp = updatedTimestamp
            self.voiceProfileDomainArn = voiceProfileDomainArn
            self.voiceProfileDomainId = voiceProfileDomainId
        }

        private enum CodingKeys: String, CodingKey {
            case createdTimestamp = "CreatedTimestamp"
            case description = "Description"
            case name = "Name"
            case serverSideEncryptionConfiguration = "ServerSideEncryptionConfiguration"
            case updatedTimestamp = "UpdatedTimestamp"
            case voiceProfileDomainArn = "VoiceProfileDomainArn"
            case voiceProfileDomainId = "VoiceProfileDomainId"
        }
    }

    public struct VoiceProfileDomainSummary: AWSDecodableShape {
        /// The time at which the voice profile domain summary was created.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var createdTimestamp: Date?
        /// Describes the voice profile domain summary.
        public let description: String?
        /// The name of the voice profile domain summary.
        public let name: String?
        /// The time at which the voice profile domain summary was last updated.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var updatedTimestamp: Date?
        /// The ARN of a voice profile in a voice profile domain summary.
        public let voiceProfileDomainArn: String?
        /// The ID of the voice profile domain summary.
        public let voiceProfileDomainId: String?

        @inlinable
        public init(createdTimestamp: Date? = nil, description: String? = nil, name: String? = nil, updatedTimestamp: Date? = nil, voiceProfileDomainArn: String? = nil, voiceProfileDomainId: String? = nil) {
            self.createdTimestamp = createdTimestamp
            self.description = description
            self.name = name
            self.updatedTimestamp = updatedTimestamp
            self.voiceProfileDomainArn = voiceProfileDomainArn
            self.voiceProfileDomainId = voiceProfileDomainId
        }

        private enum CodingKeys: String, CodingKey {
            case createdTimestamp = "CreatedTimestamp"
            case description = "Description"
            case name = "Name"
            case updatedTimestamp = "UpdatedTimestamp"
            case voiceProfileDomainArn = "VoiceProfileDomainArn"
            case voiceProfileDomainId = "VoiceProfileDomainId"
        }
    }

    public struct VoiceProfileSummary: AWSDecodableShape {
        /// The time at which a voice profile summary was created.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var createdTimestamp: Date?
        /// Extends the life of the voice profile. You can use UpdateVoiceProfile to refresh an existing voice profile's voice print and extend the life of the summary.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var expirationTimestamp: Date?
        /// The time at which a voice profile summary was last updated.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var updatedTimestamp: Date?
        /// The ARN of the voice profile in a voice profile summary.
        public let voiceProfileArn: String?
        /// The ID of the voice profile domain in a voice profile summary.
        public let voiceProfileDomainId: String?
        /// The ID of the voice profile in a voice profile summary.
        public let voiceProfileId: String?

        @inlinable
        public init(createdTimestamp: Date? = nil, expirationTimestamp: Date? = nil, updatedTimestamp: Date? = nil, voiceProfileArn: String? = nil, voiceProfileDomainId: String? = nil, voiceProfileId: String? = nil) {
            self.createdTimestamp = createdTimestamp
            self.expirationTimestamp = expirationTimestamp
            self.updatedTimestamp = updatedTimestamp
            self.voiceProfileArn = voiceProfileArn
            self.voiceProfileDomainId = voiceProfileDomainId
            self.voiceProfileId = voiceProfileId
        }

        private enum CodingKeys: String, CodingKey {
            case createdTimestamp = "CreatedTimestamp"
            case expirationTimestamp = "ExpirationTimestamp"
            case updatedTimestamp = "UpdatedTimestamp"
            case voiceProfileArn = "VoiceProfileArn"
            case voiceProfileDomainId = "VoiceProfileDomainId"
            case voiceProfileId = "VoiceProfileId"
        }
    }

    public struct VoiceToneAnalysisTask: AWSDecodableShape {
        /// The call details of a voice tone analysis task.
        public let callDetails: CallDetails?
        /// The time at which a voice tone analysis task was created.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var createdTimestamp: Date?
        /// The time at which a voice tone analysis task started.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var startedTimestamp: Date?
        /// The status of a voice tone analysis task.
        public let statusMessage: String?
        /// The time at which a voice tone analysis task was updated.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var updatedTimestamp: Date?
        /// The ID of the voice tone analysis task.
        public let voiceToneAnalysisTaskId: String?
        /// The status of a voice tone analysis task, IN_QUEUE, IN_PROGRESS, PARTIAL_SUCCESS, SUCCEEDED,  FAILED, or STOPPED.
        public let voiceToneAnalysisTaskStatus: String?

        @inlinable
        public init(callDetails: CallDetails? = nil, createdTimestamp: Date? = nil, startedTimestamp: Date? = nil, statusMessage: String? = nil, updatedTimestamp: Date? = nil, voiceToneAnalysisTaskId: String? = nil, voiceToneAnalysisTaskStatus: String? = nil) {
            self.callDetails = callDetails
            self.createdTimestamp = createdTimestamp
            self.startedTimestamp = startedTimestamp
            self.statusMessage = statusMessage
            self.updatedTimestamp = updatedTimestamp
            self.voiceToneAnalysisTaskId = voiceToneAnalysisTaskId
            self.voiceToneAnalysisTaskStatus = voiceToneAnalysisTaskStatus
        }

        private enum CodingKeys: String, CodingKey {
            case callDetails = "CallDetails"
            case createdTimestamp = "CreatedTimestamp"
            case startedTimestamp = "StartedTimestamp"
            case statusMessage = "StatusMessage"
            case updatedTimestamp = "UpdatedTimestamp"
            case voiceToneAnalysisTaskId = "VoiceToneAnalysisTaskId"
            case voiceToneAnalysisTaskStatus = "VoiceToneAnalysisTaskStatus"
        }
    }
}

// MARK: - Errors

/// Error enum for ChimeSDKVoice
public struct ChimeSDKVoiceErrorType: AWSErrorType {
    enum Code: String {
        case accessDeniedException = "AccessDeniedException"
        case badRequestException = "BadRequestException"
        case conflictException = "ConflictException"
        case forbiddenException = "ForbiddenException"
        case goneException = "GoneException"
        case notFoundException = "NotFoundException"
        case resourceLimitExceededException = "ResourceLimitExceededException"
        case serviceFailureException = "ServiceFailureException"
        case serviceUnavailableException = "ServiceUnavailableException"
        case throttledClientException = "ThrottledClientException"
        case unauthorizedClientException = "UnauthorizedClientException"
        case unprocessableEntityException = "UnprocessableEntityException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize ChimeSDKVoice
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// You don't have the permissions needed to run this action.
    public static var accessDeniedException: Self { .init(.accessDeniedException) }
    /// The input parameters don't match the service's restrictions.
    public static var badRequestException: Self { .init(.badRequestException) }
    /// Multiple instances of the same request were made simultaneously.
    public static var conflictException: Self { .init(.conflictException) }
    /// The client is permanently forbidden from making the request.
    public static var forbiddenException: Self { .init(.forbiddenException) }
    /// Access to the target resource is no longer available at the origin server. This condition is likely to be permanent.
    public static var goneException: Self { .init(.goneException) }
    /// The requested resource couldn't be found.
    public static var notFoundException: Self { .init(.notFoundException) }
    /// The request exceeds the resource limit.
    public static var resourceLimitExceededException: Self { .init(.resourceLimitExceededException) }
    /// The service encountered an unexpected error.
    public static var serviceFailureException: Self { .init(.serviceFailureException) }
    /// The service is currently unavailable.
    public static var serviceUnavailableException: Self { .init(.serviceUnavailableException) }
    /// The number of customer requests exceeds the request rate limit.
    public static var throttledClientException: Self { .init(.throttledClientException) }
    /// The client isn't authorized to request a resource.
    public static var unauthorizedClientException: Self { .init(.unauthorizedClientException) }
    /// A well-formed request couldn't be followed due to semantic errors.
    public static var unprocessableEntityException: Self { .init(.unprocessableEntityException) }
}

extension ChimeSDKVoiceErrorType: AWSServiceErrorType {
    public static let errorCodeMap: [String: AWSErrorShape.Type] = [
        "AccessDeniedException": ChimeSDKVoice.AccessDeniedException.self,
        "BadRequestException": ChimeSDKVoice.BadRequestException.self,
        "ConflictException": ChimeSDKVoice.ConflictException.self,
        "ForbiddenException": ChimeSDKVoice.ForbiddenException.self,
        "GoneException": ChimeSDKVoice.GoneException.self,
        "NotFoundException": ChimeSDKVoice.NotFoundException.self,
        "ResourceLimitExceededException": ChimeSDKVoice.ResourceLimitExceededException.self,
        "ServiceFailureException": ChimeSDKVoice.ServiceFailureException.self,
        "ServiceUnavailableException": ChimeSDKVoice.ServiceUnavailableException.self,
        "ThrottledClientException": ChimeSDKVoice.ThrottledClientException.self,
        "UnauthorizedClientException": ChimeSDKVoice.UnauthorizedClientException.self,
        "UnprocessableEntityException": ChimeSDKVoice.UnprocessableEntityException.self
    ]
}

extension ChimeSDKVoiceErrorType: Equatable {
    public static func == (lhs: ChimeSDKVoiceErrorType, rhs: ChimeSDKVoiceErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension ChimeSDKVoiceErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
